Try this
$a = array('one'=>1, 'two'=>2 );
$b = (object)$a;

> I have the following array:
> Array
> (
>     [one] => 1
>     [two] => 2
> )
> that I would like to transform into the following object
> stdClass Object
> (
>     [one] => 1
>     [two] => 2
> )
> 
> any idea ?


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

Reply via email to