
January 5th, 2005, 07:47 AM
|
 |
I'm Internet Famous
|
|
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886
 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 13
|
|
If I use strtr("\","","$form_input) or str_replace("/","",$form_input)
You have to escape the slash... str_replace("\\","",$form_input) would have worked...
A slash itself is usually used to escape special characters in a string (such as single quote, double quotes, and a backslash)...
For example, if you wanted to put quotes in your string you would use \" within the string... when printed to the screen it usually displays without the backslash...
Example:
$str="So then he said \"Spam sucks\"";
$coolW="\\/\\/"; (would display \/\/)
$str="So then he said "Spam sucks""; would throw an error
However, in your case stripslashes() is a much better solution =)
|