Following this question, I use this function to convert arrays to objects,
function array_to_object($array)
{
if(!is_array($array)) {
return $array;
}
$object = new stdClass();
foreach($array as $key => $value)
{
$key = (string) $key ;
$object->$key = is_array($value) ? array_to_object($value) : $value;
}
return $object;
}
So,
$obj = array('qualitypoint', 'technologies', 'India');
result,
stdClass Object
(
[0] => qualitypoint
[1] => technologies
[2] => India
)
But now I need to convert the object back to an array so that I can get this result,
Array
(
[0] => qualitypoint
[1] => technologies
[2] => India
)
is it possible?