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
great !
I should have thought about that ! :)
and any idea of how to cast into a specific class instead of stdClass ?
-Original Message-
From: Remy Dufour [mailto:[EMAIL PROTECTED]]
Sent: vendredi 21 juin 2002 15:21
To: phpsurf; [EMAIL PROTECTED]
Subject: Re: [PHP] using extract
2 matches
Mail list logo