phpcharlie Posted July 16, 2010 Share Posted July 16, 2010 I'm a complete noob at php, can someone tell me how to echo out the value of the "bar" field? Here is the array as shown when outputted with print_r.. Array ( [0] => Address_Event Object ( [variables] => Array ( [foo] => 0 [bar] => 1 [baz] => 1 ) ) ) Thanks guys Link to comment https://forums.phpfreaks.com/topic/207956-echo-value-from-array/ Share on other sites More sharing options...
aeroswat Posted July 16, 2010 Share Posted July 16, 2010 nvm Link to comment https://forums.phpfreaks.com/topic/207956-echo-value-from-array/#findComment-1087128 Share on other sites More sharing options...
wildteen88 Posted July 16, 2010 Share Posted July 16, 2010 It seems your array contains an object called 'Address_Event', which holds an array of variables. In which case you'll do something like $myArray[XXX]->variables['bar'] XXX being the array key/index for the object. Link to comment https://forums.phpfreaks.com/topic/207956-echo-value-from-array/#findComment-1087136 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.