I am having a strange problem in that when anything from my mysql database is retrieved and echo'd out in a php script the quotation marks in the record are being replaced by diamond shaped question marks in Google Chrome.
My mysql database is set to collation : utf8_general_ci
The part of script that is pulling down the records is as follows :
<?php
echo '<div class="testimonialswrapper">';
// Retrieve Page Content //
$testimonialssql = <<<SQL
SELECT *
FROM `testimonials`
ORDER BY id DESC
LIMIT 5
SQL;
if(!$resulttestimonials = $db->query($testimonialssql)){
die('There was an error running the query [' . $db->error . ']');
}
while($rowT = $resulttestimonials->fetch_assoc()){
if ($rowT['company'] == ''){$name = $rowT['name'];}else{$name = $rowT['name'].' - '.$rowT['company'];}
$from = $rowT['from'];
$message = $rowT['message'];
echo '<p class="testititle">'.$name.'</p>';
echo '<p class="testifrom">'.$from.'</p>';
echo '<p class="testimessage">'.$message.'</p>';
}
echo '</div>';
?>
This is included in my index.php which has the following settings :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
I have tried using htmlenteties and stripslashes and various other things, but still have the same problem.