arrays - Php snippet compared -


is there difference between following codes? difference?

$args = array(  'post_type' => $post_type,  'numberposts'  => -1,            'post_status'  => 'publish',  'meta_query' => array(          array(             'key' => $meta_key,             'value' => $meta_value,             'compare' => 'like'                  ),     ) ); 

compared with:

$args = array(             'post_type' => $post_type,             'numberposts'   => -1,                       'post_status'   => 'publish',         );  $args['meta_query'][] = array(                 'key' => $meta_key,                 'value' => $meta_value,                  'compare' => 'like');         } 

thanks!

there's no difference in 2 code snippets.

$args identical in both cases.


Comments