Hi,
If I want to delete unwanted characters from my variable (say info from a form), is this the best way to do this:
Reality is built on a foundation of dreams.
If I want to delete unwanted characters from my variable (say info from a form), is this the best way to do this:
Code:
$restricted = array("!", "@", "#", "$", "%", "^", "&", "*", "/", "(", ")", "|", "\\");
$output = str_replace($restricted, "", "$input");
$input = "oranges &*/()|\* and lemons";
print "$output";
Reality is built on a foundation of dreams.