以下代码之间有区别吗?究竟有什么区别?
$args = array(
'post_type' => $post_type,
'numberposts' => -1,
'post_status' => 'publish',
'meta_query' => array(
array(
'key' => $meta_key,
'value' => $meta_value,
'compare' => 'LIKE'
),
)
);
和....相比:
$args = array(
'post_type' => $post_type,
'numberposts' => -1,
'post_status' => 'publish',
);
$args['meta_query'][] = array(
'key' => $meta_key,
'value' => $meta_value,
'compare' => 'LIKE');
}
谢谢!