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