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 name=deptsub_select
option-select-/option
)'
Subject: RE: [PHP-DB] foreach loop from MySQL select query to HTML
select list
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
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 wonderfully -
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 MySQL select query
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 =
-
From: John Coder [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 28 November 2002 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
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 name=deptsub_select
option-select-/option
?PHP
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 now: