cast array to object php
snippet in php

convert array to object php

user1902

$arrayResult = array_map(function($array){
    return (object)$array;
}, $yourOrinalArray);

cast array to object php

user4442

$object = (object) $array;