How To Convert A PHP Object To An Associative Array

How To Convert a PHP object to an associative array

Just typecast it , for an example Here $object is my object which contain property like foo & bar on next step $array = (array) $object; -> use this to convert Object To An Associative Array.

Share 👇