將數組附加到另一個數組時困惑不已。我的意圖是將搜索參數提供給$ arg數組。將數組元素添加到PHP中的數組
$args = array(
'posts_per_page' => -1,
'post_type' => 'product',
'meta_key' => $orderby,
'orderby' => $num_orderby,
'order' => $order);
我想補充的另一個元素's' => $search_str to $arg array.
沒有這個解決你的問題? –