$replacewith = "";
$replace = "¬";
$new = str_replace("$replace","$replacewith","$toast");
$replacewith = "";
$replace = "~";
$new = str_replace("$replace","$replacewith","$toast");
The first 3 lines check to see if the variable toast has any "¬" characters in it and them deletes them. The second 3 lines check for this symbol "~" and does the same. I was just wondering if it was possible to put this script all in one str_replace so it replaces all the unwanted characters in one script, instead of doing the str replace function for every single unwanted character.
2007-02-02
01:53:35
·
5 answers
·
asked by
peter s
1
in
Computers & Internet
➔ Programming & Design