|
|
 |
RE: FN-FORUM loop in php
date posted 25th June 2002 13:53
Hi Robin,
The PHP 'foreach' feature is very powerfull. Assuming you return a hash
array of records from your SQL query you can run :-
ary=get_results_from_query();
foreach( $ary as $record ){
foreach( $record as $key=>$val ){
print( "$key = $val," );
}
print("");
}
Note - I have not run or checked this - just typed it in so there may be
some typos in there. Take a look at the online documentation for more
examples.
Regards,
Carl Taylor
Tel: 01489 557 545
Fax: 01489 576 502
http://www.adepteo.com
-----Original Message-----
From: [EMAIL REMOVED]
[EMAIL REMOVED] Behalf Of Rob Garbutt
Sent: Tuesday, June 25, 2002 1:39 PM
To: [EMAIL REMOVED]
Subject: FN-FORUM loop in php
hi all,
how would you echo the following database retrieval in a list until all the
rows have been echoed?
i've a feeling its a while loop type statement, but aren't too sure.
tia
Robin Garbutt
Portfolio Art & Design Ltd
Tel - +44 (0) 1204 383822
Fax - +44 (0) 1204 383866
Mob - +44 (0) 7811 185490
e-mail - [EMAIL REMOVED]
For further information please visit us at :-
www.portfoliodesign.net
The contents of this e-mail are confidential to the ordinary user of the
e-mail address to which it was addressed and may also be privileged. If you
are not the addressee of this e-mail you may not copy, forward, disclose or
otherwise use it or any part of it in any form whatsoever. If you have
received this e-mail in error please e-mail the sender.
================================================================
= ************************* SilkPHP ************************** =
= ---------> Free PHP Scripts for your web sites |
 |
|