php - How do I get the Array total for stdClass Object? -


I am trying to get the total for the array in the object.

I am using print_r to get the following to see it. stdClass object ([data] => array ([0] => stdClass object ([name] = & gt; flow Bible [category] => movie [id] = & Gt; 227431881228 [created_time] => 2011-02-27 T-21: 41: 04 + 0000) [1] => Study Class Object ([name] => shooter [category] => Movie [id] => 10 971715718938 [created_time] => 2011-02-16T0 9: 18: 29 + 0000) [2] => Study Class Object ([name] => Tron [Category] => Movie [id] => 99792857339 [

Here is my code to get information

  $ movies ==== ================================================== ============================ Json_decode (file _get_contents ('https://graph.facebook.com/me/movies?' .format = json and access_token = '. $ Session [' access_token ']));   

I am very new to this. Any advice will help you.

Thanks >

Try:

  $ c = count ($ movies-> Data)    

Comments