array to object
View Single Post
03-24-2008, 12:04 PM
Join Date: Apr 2007
You can check if a property exists with the appropriately named
PHP Manual Page
Note: As opposed with isset(), property_exists() returns TRUE even if the property has the value NULL.
As a side note, your original post didn't make it clear but it might be useful, have you tried something like:
$object = (object) $arrray;
since you did originally ask how "to quickly transform an array into an object".
The Following 2 Users Say Thank You to Salathe For This Useful Post:
Alan @ CIT
View Public Profile
Send a private message to Salathe
Visit Salathe's homepage!
Find More Posts by Salathe