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