Topic: Staying XHTML Valid?

hi all.  i'm trying to make my module xhtml compliant.  the following code works fine but fails the w3c test.  any tips on how to fix it?  tia.

$category_url = 'linksviewc.php?category=';

while ($row = $db->fetch_assoc($result)) {
    echo "- <b><a href=" . $category_url.$row['category'] . "> ". $row['category'] ."</a></b>"." -";
}

2

Re: Staying XHTML Valid?

Any chance of seeing the output.

Have you tried getting rid of the empty spaces in the code.

I think I would have written it like this

echo '- <a href="'.$category_url.$row['category'].'"><strong>'.$row['category'].'</strong></a> -';

Re: Staying XHTML Valid?

thanks paul!  the way you wrote it just eliminated about a hundred errors on the w3 validator.  now all i have to do is fix my form and the module will be xhtml 1 valid.  cool.  when i post a new version of the module i'll make sure to mention you knew the answer where i had a brain cramp.  smile

Re: Staying XHTML Valid?

i just posted the mod over at http://www.punres.org/viewtopic.php?pid=18137#p18137

thanks again.