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

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -