How do i force remove a single and double quotation whenever they are detected before i insert them to a table in the database? Whenever i read a data in the database with a quotation and single quotation, i am encountering problems.
Here is the code that i have tried.
<?php
$string = "sample 'word' with a quotation";
$string = preg_replace("/<!--.*-->/", "", $string);
echo $string;
?>
My code isn't working. Are there any better options?