php object from array code example
Example 1: php object to array
//This works best
$array = json_decode(json_encode($object), true);
Example 2: php convert array to object
$object = (object) $array;
Example 3: object values to array php
array_values(get_object_vars($object));