PHP: How to convert an array into an object using stdClass()

To convert array to object use:

$obj = (object)$array;

To convert object to array

$arr = (array)$object;
Exit mobile version