Answers for "transform array of objects into array php"

PHP
6

php object to array

//This works best
$array = json_decode(json_encode($object), true);
Posted by: Guest on January-28-2021
10

cast array to object php

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

Code answers related to "transform array of objects into array php"

Browse Popular Code Answers by Language