Re: using extract inside an object
| From: | Remy Dufour | Date: | Fri, 21 Jun 2002 13:20:37 +0000 |
| Subject: | Re: using extract inside an object | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-103266@lists.php.net to get a copy of this message | ||
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 ?