Posted by Michael Fesser on 07/20/07 08:28
..oO(Joe Scylla)
>foreach ($months as $i => $v)
> {
> echo "<option value=\"" . $i . "\"";
> if ($i == $selected) echo " selected=\"selected\"";
> echo ">" . $v . "</option>";
> }
HTML also allows single quotes (avoids escaping) and variables can be
embedded directly into the string (avoids concatenation).
Just my 2 cents
Micha
Navigation:
[Reply to this message]
|