I would like to remove the symbol °
from a field that's to be inserted into my database. Now I already have Format::Strip_tags
on my field.
How can I get the value °
from the field to be changed with #
? The symbol °
gives error and when I check my MYSQL database, I get this:
Connection: utf8_general_ci
Database: latin1_swedish_ci
Server: latin1_swedish_ci
In PHP:
str_replace('°', '#', $yourString)
You could use the REPLACE funciton:
INSERT INTO YourTable
SELECT REPLACE(YourValue, '°', '#')
...
精彩评论