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
Post a Comment