I want to replace all £ to its HTML code £ => £ because it shows up as a ? in a diamond.
I am using the following code but it does nothing.
<?php
include ("config.php");
$get_id = mysql_real_escape_string($_GET['id']);
$page_get = mysql_query("SELECT * FROM contents_page WHERE `id` = '$get_id'");
while($page_row = mysql_fetch_assoc($page_get)) {
$page_row["Page_Content"] = str_replace('£','£',$page_row[Page_Content]);
$smarty->assign('page_title', $page_row['Page_Title']);
$smarty->assign('page_content', $page_row['Page_Content']);
}
$smarty->display('page.tpl');
?>
I am using str_replace() but nothing happens its like it cannot see the £