PHP - Convert stdClass object to Array
Posted: 02 May 2015, 06:49
I have the following object in php:
How can I covert it to an array, so I can use: $array['property']?
Code: Select all
$ob = new stdClass;
$ob->name = 'some-name';
$ob->email = 'email-address';
$ob->site = 'https://coursesweb.net/';