Hi I am storing some text in a mysql column. The error I am getting is whenever there is an apostrophe (') in the text it's getting displayed as '’'even though apostrophe is being displayed in the database Any ideas what would be the error? I have spent days but no luck
You can check the error here : http://beta.writiely.com/
Here how it's connecting and fetching result
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT * from textDocs";
$result = $conn->query($sql);
$res = array();
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
array_push($res,array('t'=>$row['t'],'co'=>$row['cover'],
'text'=>$row['txt']));
}
} else {
return false;
}
$conn->close();