user3653409
user3653409

Reputation: 129

Get a value from a multidimensional array Wordpress

I've this array :

$args = array(
    'tax_query' => array(
        array(
            'taxonomy' => 'agence',
            'field' => 'slug',
            'terms' => array( 'dinan')
            )
        )
    ); 

I want to pick the value 'dinan' from this array, Thanks for the reply !

Upvotes: 0

Views: 334

Answers (1)

DocRattie
DocRattie

Reputation: 1423

The way to pick from that array:

$tmp = $args['tax_query']['terms'][0];

Upvotes: 2

Related Questions