PHP

Moderators: None (Apply to moderate this forum)
Number of threads: 1848
Number of posts: 5016

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
foreach in php Posted by lucky_me on 24 Jul 2004 at 5:33 PM
i want to use "foreach " loop statement in my php program.instead of taking array i want to use the resultant query(taken from the database) is this possible to do so.
like...

foreach($result as $key=>$value){
// statement to print the records.

I am confused....i think when we fetch some records from database and stores it in any variable . it's (the variable is)an array in itself. I may be wrong.If i am ...then please correct me.

Thanks in advance.

Thread Tree
lucky_me foreach in php on 24 Jul 2004 at 5:33 PM
skylar Re: foreach in php on 26 Jul 2004 at 8:28 AM
lucky_me Re: foreach in php on 26 Jul 2004 at 10:22 AM
skylar Re: foreach in php on 9 Aug 2004 at 9:09 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.