Re: [PHP] anchor name on URL



If you do not escape the name attribute you might run into trouble
when using XHTML. Always escape attributes properly.

GOOD:
<?php
echo <<<HEREDOC
<div style="padding-bottom: 1500px;div style="padding-bottom: 1500px;">
<a href="#aynchoor" title="some_aynchoor" name="some_aynchoor">Click me</a>
</div>
<div style="padding-bottom: 1500px; background-color: #f00baa;">
<a href="#some_aynchoor" title="aynchoor" name="aynchoor">Click me too</a>
</div>
HEREDOC;
?>

BAD:
<?php
echo '<a href=#aynchoor title=some_aynchoor>Click me';
echo '<a href=#some_aynchoor title=aynchoor name=aynchoor>Click me too';
?>
.