see anything wrong (xhtml validator)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



it seems the xhtml validator is throwing an error with:

------------------------------------------------------
Line 530, column 12: value of attribute "id" invalid: "1" cannot start a
name

<div id=" 1 79" style="display: none;">
------------------------------------------------------


Here is the code:

$outnews = "
<div class=\"fade\" style=\"padding-top : 5px; padding-bottom : 5px\">
<b>continues &#187;</b> <a href=\"/shownews/".$news['id']."\"
onclick=\"return hidetoggle('".$news[id]."');\"
onmouseover=\"window.status='".$news['status']."'; return true;\"
onmouseout=\"window.status=''; return true;\"><b>" .
stripslashes($news['morelink']) . " (" . $count . " more
words)</b></a></div>

<div id=\"".$news['id']."\" style=\"display: none;\">
<div class=\"newsleft\">" . $news['moretext'] . "</div></div>";

for some odd reason the validator is showing a space before the $news['id']
in the <div> id tag, even though the actual news ID is fine and there are no
spaces in the raw xhtml code above.. maybe im blind ..

i'd really like to get rid of the \" escapes and just use single quotes, but
i would guess i have to escape the javascript single quotes?

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux