asitha
asitha

Reputation: 219

retrieving value from array

print_r($array) results
I retrieved some values from database and got the following result while using print_r:

Array
(
    [122] => Array
        (
            [p_name] => Tony Hutson
            [p_image] => profile_image/profile_61323166474.jpg
            [pid] => 42
            [sid] => 122
            [stitle] => sfcxdggf
            [audio] => audio_file/audio_61324302202.mp3
            [s_description] => ?mnlmkl bvnbmnmmn, bnbmn 
            [s_image] => sermon_image/image_41324302202.jpg
        )

    [count] => Array
        (
            [count] => 2
        )
)

How can I retrieve the value of count?

Upvotes: 1

Views: 131

Answers (2)

Raj
Raj

Reputation: 22926

Like this,

echo $array['count']['count'];

Upvotes: 1

Natasha
Natasha

Reputation: 980

echo $array['count']['count'];

Upvotes: 5

Related Questions