Firstly which of these functions return a string with single quote:
$data = strval($data);
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
$data = mysqli_real_escape_string($mysqli,$data);
And how can I assure my string has double quotes and both ends instead of '
? Tyvm for your help
EDIT: I receive my string directly in a POST (as in $received = $_POST["string"]) and run $received through one of those functions above that ultimately turns it into '$received' since it does not react to explode("\n",$received)