Convert PHP object to associative array by casting it with the array keyword.

$array =  (array) $object;