php access array value from function return

Posted by David Morrow on Stack Overflow See other posts from Stack Overflow or by David Morrow
Published on 2010-05-20T15:20:15Z Indexed on 2010/05/20 15:30 UTC
Read the original article Hit count: 169

Filed under:
|
|

silly php question... why cant i do this?

echo Auth::getFullUser()[ 'country' ];

instead you have to do this

$user = Auth::getFullUser();
echo $user[ 'country' ];

© Stack Overflow or respective owner

Related posts about php

Related posts about array