Answers for "Cannot use object of type stdClass as array {"exception":"[object] (Error(code: 0): Cannot use object of type stdClass"

PHP
6

cannot use object of type stdclass as array

$obj_user = json_decode($user, true);

use json_decode($obj, true); 	// add true
Posted by: Guest on January-27-2021

Code answers related to "Cannot use object of type stdClass as array {"exception":"[object] (Error(code: 0): Cannot use object of type stdClass"

Browse Popular Code Answers by Language