Forum Moderators: coopster

Message Too Old, No Replies

echo these values

how to echo array in php

         

borisz

6:26 pm on Oct 4, 2011 (gmt 0)

10+ Year Member



hi everyone, can someone help me to echo [city] and [country] from this array:

Array
(
[0] => Array
(
[uid] => 123456789
[name] => First Last Name
[current_location] => Array
(
[city] => New York
[state] => New York
[country] => United States
[zip] =>
[id] => 123456789
[name] => New York, New York
)

[profile_url] => http://www.facebook.com/username
)

)


thanks.

httpwebwitch

6:41 pm on Oct 4, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



say the array is assigned to variable $array,

echo $array[0]['current_location']['city'];
echo $array[0]['current_location']['country'];

borisz

7:53 pm on Oct 4, 2011 (gmt 0)

10+ Year Member



thanks a lot