Q:

Replace all special characters from a string using PHP

I am using jQuery editor with PHP it works fine for plane text (text with out special characters)
but if I try to post text which contain special characters then it does not store these special characters in to db table..
and when I tried to replace any special character with HTML codes it works fine.
But it is too difficult to replace all special character one by one..
Is there any script which replace all special characters from a string...?

A:

Do you mean something like PHP's str_replace()?
http://php.net/manual/en/function.str-replace.php

