Answers for "make object from array php"

PHP
9

php convert array to object

$object = (object) $array;
Posted by: Guest on March-17-2020
1

convert array to object php

$arrayResult = array_map(function($array){
    return (object)$array;
}, $yourOrinalArray);
Posted by: Guest on July-17-2020
0

object values to array php

array_values(get_object_vars($object));
Posted by: Guest on September-18-2020

Browse Popular Code Answers by Language