FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Novice Question
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Novice Question [message #180591 is a reply to message #180587] Mon, 04 March 2013 10:31 Go to previous message
Captain Paralytic is currently offline  Captain Paralytic
Messages: 204
Registered: September 2010
Karma:
Senior Member
On Mar 3, 10:10 pm, David Heller <da...@allheller.net> wrote:
> Hello
>
> I'm doing some maintenance/upgrade of some old php4.3 code and I ran
> across the following code snippet:
> $gvns = (array)$gvns;
> What it exactly is happening here? what does (array) mean?
> never seen anything like this before.
>
> Dave

It is a construct often used to change object properties into an
associative array. Another method (which may have slightly different
results) is to use the get_object_vars() function. Search Google for
php get_object_vars vs array cast
to see discussions on the differences.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: XML error when accessing a certain method of a wsdl service
Next Topic: Dynamically change video URLs
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Oct 28 10:01:46 GMT 2024

Total time taken to generate the page: 0.06353 seconds