stdClass to array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey folks,

Does anyone know of a painless way to convert a stdClass object to an
associative array in php?

Also, I wonder, is there a way to "flatten" associative arrays in php?
So say:  
$b=new array(s=>"S")
$a=new array(a=>"A",b=>$b) 

goes to:
 $z=flatten($a);
z turns to:
 (a=>"A", b=>$b, s=>"S");

Thanks,
Cere

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux