I am trying to sanitize my URL, and the GET
variable may contain a quotation mark, single or double.
$teststring = $row['story_title'];
$sanitized_test = str_replace("'", "~", $teststring);
echo $teststring . " versus " . $sanitized_test;
What this prints:
'''' versus ''''
What i expect it to print:
'''' versus ~~~~
When $teststring = "''''";
everything works fine. Why is this happening?