Friday 12 December 2014

fetching value from multidimentional array

fetching value from this kind of array -

 print_r($user_last) gives result -
  then fetching city code - $scity =  $user_last['city'][0];
Array
(
    [nickname] => Array
        (
            [0] => rakesh
        )
    [first_name] => Array
        (
            [0] => rakesh
        )

    [last_name] => Array
        (
            [0] => roshan
        )
    [city] => Array
        (
            [0] => mohali
        )
)

No comments:

Post a Comment