Re: HTML lists & PHP
| From: | hugh danaher | Date: | Mon, 28 Jan 2002 22:27:05 +0000 |
| Subject: | Re: HTML lists & PHP | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-82477@lists.php.net to get a copy of this message | ||
Try
$teams[${"r1"."1"}]
or a variation on this theme
hugh
----- Original Message -----
From: "Edward van Bilderbeek - Bean IT" <edward@bean-it.nl>
To: "Phil Schwarzmann" <pschwar@jhmi.edu>; <php-general@lists.php.net>
Sent: Monday, January 28, 2002 2:16 PM
Subject: Re: [PHP] HTML lists & PHP
> maybe you can try something like this...
>
> $r1 = "game1"
> $r2 = "game16";
>
> echo "<select name='game'>";
> echo "<option value=game1>$teams[$r1]</option>";
> echo "<option value=game1>$teams[$r2]</option>";
> echo "</select>";
>
> Greets,
> Edward
>
>
>
> > I keep getting parse error with this code:
> > ($teams[] is a big array that I got by using mysql_fetch_array)
> >
> >
> > $r = "game";
> > echo "<select name='game'>";
> > echo "<option value=game1>$teams[$r.'1']</option>";
> > echo "<option value=game1>$teams[$r.'16']</option>";
> > echo "</select>";
> >
> > Im trying to make a dropdown list.
> >
> > Here is the error message:
> > Parse error: parse error, expecting `']'' in
> > /home/filanya/www/madness/bracket.php on line 65
> >
> > (line 65 is the third line down)
> >
> > THANKS!!!!!!!!
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>