php - Array shows values but print_r(array_values) is empty -


i'm getting response service , print_r() shows array seems different usual arrays. if print array_values it's empty. php:

    print_r($token);  //result: array ( [{"access_token":"123","token_type":"bearer"}] => )      print_r(array_values($token));  //result: array ( [0] => )  

why access_token , token_type values not listed in array_values?

the answer not json, it's not because have json type array. because there no value in array.

//result: array ( [{"access_token":"123","token_type":"bearer"}] => )  

that array has 1 index no value, hence array_values shows nothing. have created array incorrectlly :)


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 -