note 11607 added to Variable variables
| From: | mak at travelgate dot de | Date: | Tue, 27 Feb 2001 10:19:19 +0000 |
| Subject: | note 11607 added to Variable variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-11631@lists.php.net to get a copy of this message | ||
Select :
............
if (isset($day)){
$opt="optd";
$opt.=$day;
$$opt="selected";
}
...............
echo "<select name=\"day\">";
for ($i=1; $i<=31; $i++){
$var=${"optd".$i};
echo "<option value=\"$i\" $var>$i";
}
http://www.php.net/manual/en/language.variables.variable.php