Tag: json_decode
Fatal error: Cannot use object of type stdClass as array (php json_decode)
by z3n on Feb.17, 2010, under Coding, Notes, Tips & Hints
Problem:
$var=json_decode($_POST['something']);
echo $var['value'];
returns error: Fatal error: Cannot use object of type stdClass as array
Solution:
echo $var->value;