Getting keys from an object

You can use array_keys to get the keys from an array but how do you get the keys from elements in an object. 

Easiest method is to cast the object to an array and use array_keys.

$Keys = array_keys(array)$ObjectName);

You have no rights to post comments