Your code, as it stands, will error. If you include a "
character in a string literal delimited with "
characters then you have to escape them so they count as data and not the end of the string.
$description="Welcome to our \"world\". Some text here! Some text'here!.";
I am using the same variable $description for store and retrieve values in database
If you are having problems inserting data into a database, then you should include the code you are using to try to do that.
You should not be using mysql_real_escape_string
(which is for preparing data to be inserted into a MySQL database when you are using an an obsolete database API). Use a modern API and parameterized queries.)
You do not need to remove HTML entities from the string. (Your example doesn't have any anyway). If you are dealing with user input data, then you should use a non-destructive way to deal with them (which usually means, if you want to treat the input as text, escaping them with htmlspecialchars
immediately before inserting them into an HTML document (not before inserting them into a database).