php assign object array data to a variable code example
Example 1: object to array php
$array = (array) $yourObject;
Example 2: object values to array php
array_values(get_object_vars($object));
$array = (array) $yourObject;
array_values(get_object_vars($object));