php objects, json, an array Huzhuan

Objects turn json

$json=json_encode($postObj,JSON_FORCE_OBJECT);

json turn objects

$obj=json_encode($json);

turn json array

$arr=json_decode($json,true);

 

Guess you like

Origin www.cnblogs.com/huay/p/11422518.html