RE: [PHP-DB] foreach loop from MySQL select query to HTML select list

2002-11-28 Thread Rick Widmer
At 10:40 AM 11/29/02 +1100, Gavin Amm wrote: hmm, interesting to know the mysql_fetch_array() by default returns an array that's associative AND numeric - very useful to know & something i'll have to look into more, thanks Jason. Using PHP's built in template system... $result_dept = mysql_quer

RE: [PHP-DB] foreach loop from MySQL select query to HTML select list

2002-11-28 Thread Gavin Amm
thanks John, i was thinking along similar lines. that should work well. cheers, Gav -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Friday, 29 November 2002 4:08 PM To: 'Gavin Amm'; 'Php-Db (E-mail)' Subject: RE: [PHP-DB] foreach loop from M

RE: [PHP-DB] foreach loop from MySQL select query to HTML select list

2002-11-28 Thread John W. Holmes
> hmm, interesting to know the mysql_fetch_array() by default returns an > array > that's associative AND numeric - very useful to know & something i'll have > to look into more, thanks Jason. > > Thanks also John, puting curley braces around the variables is a valuable > lesson - works wonderfull

RE: [PHP-DB] foreach loop from MySQL select query to HTML select list

2002-11-28 Thread Gavin Amm
{$row['dept']}\n"; } ?> cheers, Gav -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Friday, 29 November 2002 2:59 AM To: 'Gavin Amm'; 'Php-Db (E-mail)' Subject: RE: [PHP-DB] foreach loop from MySQL select query to HTML select l

RE: [PHP-DB] foreach loop from MySQL select query to HTML select list

2002-11-28 Thread John W. Holmes
> i've looked around the web a bit more & it would appear you can't just use > a > foreach function, apparently you need to use a while{foreach{}} structure. > i > was hoping you could just use the foreach function? > > so this is the code now: > > > -select- > while ($row = mysql_fet

Re: [PHP-DB] foreach loop from MySQL select query to HTML select list

2002-11-27 Thread Jason Wong
On Thursday 28 November 2002 14:21, Gavin Amm wrote: > ok, > > i've looked around the web a bit more & it would appear you can't just use > a foreach function, apparently you need to use a while{foreach{}} > structure. i was hoping you could just use the foreach function? > > so this is the code no

RE: [PHP-DB] foreach loop from MySQL select query to HTML select list

2002-11-27 Thread Gavin Amm
ok, i've looked around the web a bit more & it would appear you can't just use a foreach function, apparently you need to use a while{foreach{}} structure. i was hoping you could just use the foreach function? so this is the code now: -select- $value\n"; } } ?> but now th

RE: [PHP-DB] foreach loop from MySQL select query to HTML select list

2002-11-27 Thread Gavin Amm
002 3:44 PM To: Gavin Amm Cc: Php-Db (E-mail) Subject: Re: [PHP-DB] foreach loop from MySQL select query to HTML select list On Wed, 2002-11-27 at 23:33, Gavin Amm wrote: > Hi, > > I'm trying to pick up data from my MySQL database, use a foreach loop to > extact the data from th