How can I convert an array like this to an object?
[128] => Array ( [status] => "Figure A. Facebook\'s horizontal scrollbars showing u
Actually if you want to use this with multi-dimensional arrays you would want to use some recursion.
static public function array_to_object(array $array) { foreach($array as $key => $value) { if(is_array($value)) { $array[$key] = self::array_to_object($value); } } return (object)$array; }