I am using mysql with PHP. I have a problem with inserting the apostrophe value in database. However I use –
$newstring = str_replace("'","'",$string);
OR
$newstring = str_replace("'","''",$string);
but how could I fetch the string as it is?
Thanks.
you need to escape it, use
addslashes()to sanitise it, or better yet,mysql_real_escape_string()