php - Why can't I get array key value after function? -


i'm calling wordpress function:

get_user_meta($user->id, "user_address"); 

and returns array, don't want put variable echo out.

but doesn't work:

get_user_meta($user->id, "user_address")[0]; 

why? way 1 liner?

as per function reference have pass third argument true return single value.

get_user_meta($user->id, "user_address",true); 

Comments

Popular posts from this blog

python - cx_oracle unable to find Oracle Client -

shader - OpenGL Shadow Map -

c# - Exchange 2010/2013 TransportAgent Content Conversion for Internal Recipients -