a simple way to convert array to object in PHP
PHP:
-
<?php
-
function parseArrayToObject($array)
-
{
-
$object = new stdClass();
-
{
-
foreach ($array as $name=>$value)
-
{
-
{
-
$object->$name = $value;
-
}
-
}
-
}
-
return $object;
-
}
http://forum.weblivehelp.net/web-development/php-convert-array-object-and-vice-versa-t2.html
