Ah, so often it’s the little things eh…
PROBLEM: I needed to find a way to “re-process” text a user enters for a live chat client I’m working on (in which I prevented MySQL database injections via the mysqli_real_escape_string function). The problem of course is that the text the user enters nicely protects you from a MySQL database injection, BUT the text then comes back full of backslash (\) characters (not too cool looking huh). So, to remove these, you can use the following code (here, I use the PHP str_replace function:
// Convert escaped characters back to regular text
$string = str_replace("\\", "", $string);
Thanks to Geoff Muldoon for this one!:
How to replace a backslash character in a string?