Forum Moderators: coopster
i'm using this code to display a MySql table into my web pages, but sometimes the result come out with a slash before all apostrophes, like this text example:
<td>at \'The House of Love\'</td>
these appearing slashes are also making unreadable all hyperlinks in the html output.
here's the code i'm using to display MySql table, please do you find any bug that may cause this slash problem?
thanks in advance,
tito
-----------------------------------
mysql_select_db("mix");
$query = "select * from x_data";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
echo "<p>Total Mixes: ".$num_results."</p>";
$output = "
<table>
<thead>
<td><b>Dj</b></td>
<td><b>Mix</b></td>
<td><b>Genre</b></td>
<td><b>Date</b></td>
<td><b>Tracklist</b></td>
<td><b>Time - Size - Bit Rate</b></td>
<td><b>Stream</b></td>
<td><b>Download</b></td>
<td><b>mp3</b></td>
</thead>
";
while ($row = mysql_fetch_array($result)){
$output .= "
<tr>
<td>".$row["dj"]."</td>
<td>".$row["mix"]."</td>
<td>".$row["genre"]."</td>
<td>".$row["date"]."</td>
<td>".$row["tracklistfeedback"]."</td>
<td>".$row["info"]."</td>
<td>".$row["stream"]."</td>
<td>".$row["download"]."</td>
<td>".$row["mp3"]."</td>
</tr>
";
}
$output .= "
</table>
";
print $output;
include ("includes/footer.inc");
?>
-----------------------------------