RE: [PHP] dynamic arraynames
| From: | John W. Holmes | Date: | Sat, 23 Nov 2002 15:58:02 +0000 |
| Subject: | RE: [PHP] dynamic arraynames | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125732@lists.php.net to get a copy of this message | ||
> I am trying to generate arrays to hold inputs to columns. Column
> titles are input to a table as needed. They are read by the program
> and placed across the page. Then an array goes under each column name
> to collect the inputs to the various rows. Everything works except to
> dynamically change the name of the array.
>
>
> while($foo=mysql_fetch_array($mysql_result)){
> print "<INPUT TYPE=text NAME=correspondingfoo[]>";}
Do you want this??
print "<INPUT TYPE=text NAME=" . $foo['something'] . "[]>";
---John Holmes...