[eluser]dadamssg[/eluser]
Im pulling stuff out of my db to display. Some of my entries have apostrophes, but when i pull them out and display them they are changed to this ’57 . How do i change this back to apostrophes??
controller
Code:
<?php
class Mains extends Controller {
function Mains()
{
parent::Controller();
$this->load->helper('url');
$this->load->helper('form');
}
function index()
{
$data['title'] = "Home";
$data['heading'] = "All Events";
$data['query'] = $this->db->get('test');
$this->load->view('main_view', $data);
}
}
?>
main_view.php
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html >
<head>
<title><?php echo $title; ?></title>
</head>
<body>
<h1><?php echo $heading; ?></h1>
<?php if($query->num_rows() > 0): ?>
<?php foreach($query->result() as $row): ?>
<h3><?php echo $row->title; ?></h3>
<p><?php echo stripslashes($row->description); ?></p>
<hr>
<?php endforeach; ?>
<?php endif; ?>
</form>
</body>
</html>