cannot use object of type stdclass as array php code example
Example: cannot use object of type stdclass as array
$obj_user = json_decode($user, true);
use json_decode($obj, true); // add true
$obj_user = json_decode($user, true);
use json_decode($obj, true); // add true