Forum Moderators: coopster
I have been banging my head against a brick wall with this one.
I have a script generating the meta keywords / descriptions for a website I am building but for some reason I keep getting a  in the keywords. It happens before I echo out a £ sign.
I have changed the charset on the site to no avail.
I am getting the results for the k/words from a mysql query, and I am putting the £ sign in using a CONCAT.
eg
$query = mysql_query("SELECT CONCAT(artist,' - ',title,' £',cost) FROM products") or die(mysql_error());
This will produce the  symbol like the following....
jo_blogs - his_cd £9.99 I have also tried replacing the £ with £ to no avail as it echos out the following....
jo_blogs - his_cd £9.99 I then tried this....
echo "£".$meta_info; and I get this...
£jo_blogs - his_cd £9.99 as you can see the previous example echos the first £ sign WITHOUT the  symbol!
What can I do!?!
Cheers guys! ;o)
I had this issue too so now use £ instead of £ this solved the problem.
if I use....
<?php echo "£ - ".$row['test_value'];?> and $row['test_value'] has a value of £6.99 (returned from the CONCAT of the query), I get the following...
£ - £6.99
This is saying to me that the charset must be correct since the first £ symbol is fine, not the second (which is a string returned from the mysql query).
So why is this happening?