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

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -