Aplogies if this is in the wrong section, it's my first post!
I'm currently getting the following error when validating my page (and 2 similar pages) as XHTML 1.0 Transitional:
character "&" is the first character of a delimiter but occurred as data
I have been through all the pages and fixed all & to appear as & in the code, but the remaining ones are taken from a database.
My code is as follows:
while ($row = mysql_fetch_array($result)) {
$title=$row['title'];
$imdb=$row['imdb'];
echo "<tr class=\"d".($j & 1)." $style\">";
echo "<td><a href=\"$imdb\" title=\"$title\" target=\"_blank\">$title</a></td>";
echo "</tr>";
$j++;
}
The page displays correctly, but any & contained in the title in the database doesn't get changed to & when it is called.
What confuses me though is that the ones within the title="" part do get validated. Is there a way to force & to be changed to & when called from a database?
Also the same problem occurs when I enter & into the database itself.
Thanks.