php array of objects to array code example
Example 1: php object to array
//This works best
$array = json_decode(json_encode($object), true);
Example 2: object to array php
//It is verry easy : just cast object to array
$array = (array)$object;
Example 3: object values to array php
array_values(get_object_vars($object));