Hello ,
I have a problem with, special characters inserted into database. From some key boards the symbol '-' was bigger than normal. Although it was taken into database. But while reading some browser was't reading that Big "-".
the html equilant to that Big'-' will be – , How can i remove that Big "-" from database, and replaced with small '-' ie normal one.
i Have writted the code,
ereg_replace(– ,'-',$value);
But In the database, the filed $value does not have exactly – . There it was like that Big '-', From my key board i can't able to type that perticular character, even i tried combining two hiphans like '--', but it wont helped.
Please give any suggestions to remove that Big '-' from databse and replace normal one
Thank U,
Murali
PHP Programmer
problem with html tags
Moderator: General Moderators
-
B.Murali Krishna
- Forum Commoner
- Posts: 28
- Joined: Fri May 12, 2006 2:05 am
- Location: Hyderabad,India
- Contact:
Seems a bit more efficient to me to use MySQL's built in REPLACE() function.
REPLACE(str, from_str, to_str)
Returns the string str with all occurrences of the string from_str replaced by the string to_str. REPLACE() performs a case-sensitive match when searching for from_str.
http://dev.mysql.com/doc/refman/5.0/en/ ... tions.htmlCode: Select all
mysql> SELECT REPLACE('www.mysql.com', 'w', 'Ww'); -> 'WwWwWw.mysql.com'