Posted by Joe Scylla on 07/20/07 10:52
Michael Fesser wrote:
> .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
it's just my coding style to use only double quotes and never embedd
variables into string.
While theres no difference in using double or single quotes - but
concatenation is much faster than embedd variables into strings.
[Back to original message]
|