Cannot use object of type stdClass as array jsin 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