On Thu, October 26, 2006 12:14 pm, Robert Cummings wrote:
> On Thu, 2006-10-26 at 11:43 -0500, Richard Lynch wrote:
>>
>> $last_day = 31; //calculated from date()/mktime() etc
>> for ($day = 1; $day <= $last_day; $day++){
>>   $selected = $chosen_day == $ ? 'selected="selected"' : '';
>>   echo "  <option $selected>$day</option>\n";
>> }
>>
>> I don't *think* the w3c requires/recommends a value= in there, if
>> the
>> label *IS* the value, but can live with it either way...
>>   echo "  <option value=\"$day\" $selected>$day</option>\n";
>> is fine.
>
>>From the XHTML standard:
>
>     http://www.w3.org/TR/html/#diffs
>
> We read the following:
>
>     XML does not support attribute minimization. Attribute-value pairs
>     must be written in full. Attribute names such as compact and
> checked
>     cannot occur in elements without their value being specified.
>
>         CORRECT: unminimized attributes
>
>             <dl compact="compact">
>
>         INCORRECT: minimized attributes
>
>             <dl compact>
>
> So even if you aren't using XHTML yet, it's wise to get into the
> practice.

A) I see no need, now or ever, to use XHTML.

B) What you are referencing has ZERO BEARING on the question of not
having ANY value attribute at all, as far as I can see:
<option>5</option>
This does not have a minimized VALUE attribute.
It has *NO* value attribute at all.

:-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to