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

Home » Imported messages » comp.lang.php » ArrayAccess interface, Traversable interface and foreach
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: ArrayAccess interface, Traversable interface and foreach [message #186028 is a reply to message #185989] Mon, 02 June 2014 14:15 Go to previous message
kurtk(at)pobox(dot)com is currently offline  kurtk(at)pobox(dot)com
Messages: 10
Registered: May 2012
Karma:
Junior Member
> You can use any object (whether it is an instance of a class that
>
> implements Traversable or not) in a foreach loop, see
> <http://www.php.net/manual/en/control-structures.foreach.php>.

Thanks Christoph. I didn't realize that any object can be used in a foreach loop, and that it doesn't need to implement an interface that derives from Traversable.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: mysqli fetch_assoc() straight to array
Next Topic: Pthread with amazon sns
Goto Forum:
  

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

Current Time: Tue Feb 04 06:52:28 GMT 2025

Total time taken to generate the page: 0.02787 seconds