RE: [PHP-WIN] foreach with mysql
| From: | Kyle Williamson | Date: | Tue, 11 Mar 2003 19:32:26 +0000 |
| Subject: | RE: [PHP-WIN] foreach with mysql | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-18977@lists.php.net to get a copy of this message | ||
Why a foreach?
while($row = mysql_fetch_array($result)) {
echo "$row[name]";
}
>===== Original Message From <s.garriock@rgc.aberdeen.sch.uk> =====
>Hi
>I am trying to use a FOREACH command to go through a mysql result with 2
>columns.
>They are ID and name
>I need the name one the ID one is just for referrence.
>Anyone got the syntax for it?
>
>Thanks tons
>From Shaun Garriock
>RGC Webmaster
>
>*** The contents of this message are confidential and are intended for the
addressee only. The views expressed in this message do not necessarily
represent those of Robert Gordon's College. Electronic mail transmission is
not guaranteed to be secure, therefore, Robert Gordon's College does not
accept liability for the contents of this transmission. This message does not
form a legal binding contract. ***
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
==
Kyle Williamson
Solent Educational
Tel: (023) 80 848319 Fax: (023) 80 848715