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