How can I convert an array like this to an object?
[128] => Array ( [status] => "Figure A. Facebook\'s horizontal scrollbars showing u
recursion is your friend:
function __toObject(Array $arr) { $obj = new stdClass(); foreach($arr as $key=>$val) { if (is_array($val)) { $val = __toObject($val); } $obj->$key = $val; } return $obj; }