How can I convert an array like this to an object?
[128] => Array ( [status] => "Figure A. Facebook\'s horizontal scrollbars showing u
Easy:
$object = json_decode(json_encode($array));
Example:
$array = array( 'key' => array( 'k' => 'value', ), 'group' => array('a', 'b', 'c') ); $object = json_decode(json_encode($array));
Then, the following is true:
$object->key->k === 'value'; $object->group === array('a', 'b', 'c')