I use this regex to remove all punctuation from string input,
$pg_url = preg_replace("/\W+/", " ", $pg_url);
but there are some characters or special characters that I cannot delete, for example
β
when i pass this into my db injection it will either turn into Γ’orΓ’β¬
How can I get rid of these strange things?
Thank.
source
share