I am making a simple blog model in php for now i have added this data directly in data from phpmy admin this is the dummy data
Post-ironic mumblecore authentic, stumptown try-hard chambray sartorial
McSweeney’s VHS put a bird on it. Pitchfork lomo meggings, meh whatever cred
beard four loko hella. Flannel swag normcore, leggings 3 wolf moon meditation
Marfa hella fingerstache Thundercats mustache. Lo-fi typewriter Shoreditch,
Odd Future fingerstache iPhone retro McSweeney’s four loko Kickstarter hoodie
'
Post-ironic mumblecore authentic, stumptown try-hard chambray sartorial
McSweeney�s VHS put a bird on it. Pitchfork lomo meggings, meh whatever
cred beard four loko hella. Flannel swag normcore, leggings 3 wolf moon
meditation Marfa hella fingerstache Thundercats mustache. Lo-fi typewriter
Shoreditch, Odd Future fingerstache iPhone retro McSweeney�s four loko
Kickstarter hoodie
<?php echo $value['post_content']; ?>
htmlspecialchars_decode
$query = "SELECT * FROM posts";
$connection = $this->establish_connection();
$data = $connection->query($query);
$connection->close();
It is a Unicode problem .
The original text is encoded with different Unicode not that you use to display (utf8
) so , try this:
$query = "SELECT * FROM posts";
$connection = $this->establish_connection();
$connection->set_charset("utf8");
$data = $connection->query($query);
$connection->close();