php - After JSON decode, all the values of one key is become zero -


i trying decode json encoded data following way.but values of post_count key 0 after decode. json encoded data not contain 0 array key.

$news_users_data = @json_decode(file_get_contents("http://athavannews.com/?page_id=232365&datefrom=2015-07-02+00:00:00&dateto=2015-07-02+23:59:59"), true); 

you can check json encoded data pasting above url on browser , can see post_count key not include zero. var_dump $news_users_data, post_count key contain zero. why that?

the decoding works fine. please dump result end watch carefully. of post_count set 0, because receive website. but, can find ex.:

 15 =>  array (size=3)   'id' => int 35   'name' => string 'risha' (length=5)   'post_count' => string '2' (length=1) 

if there should more posts returned in count problem lays on website, in decoding json.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -