php convert array of objects into flat array code example Example: php convert array to object $object = (object) $array;