Hi i have a query that retrives fields from the database now i have a query now on the form teh user has to put sign (£) i am trying to grab that row and evrytime it finds the (£) on that particular field replace when it echo the row film_price replace any (£) signs with (£)
Example on the databse the user typed £45 to £55 when echo that row on html replace the (£) signs with html (£) which is (£) i have tried
Or simply switch to UTF-8 and keep the pound as is
Let’s call a spade a spade; ISO-8859-* sucks (not as much as the proprietary CP-* crap though).
(yeah, I don’t like character sets, does it show? (
Your code won’t work because your only supplying the str_replace() function with one argument when it requires three, see the updated code below which should work fine.
Also as a note, when using special character codes such as “pound” you always need to end it with a semicolon “;” otherwise the browser will skip over it and read it as plain text.