I'm using a script, and it's having a problem with some characters. There is a fix for it, but I can't quite figure it out. The fix is to replace 3 instances of:
Can someone please help with this code snippet?
1
I'm using a script, and it's having a problem with some characters. There is a fix for it, but I can't quite figure it out.
The fix is to replace 3 instances of:
with
To clarify, in each instance of replacing you need to make sure the $str is the same as the one replacing. The preg replace applies to the same $var as the str_replace.
However, the 3 instances where str_replace appear look like this:
So I'm unclear on exactly what I should change my lines to. Any help? If you could show me in detail it would be appreciated.
The fix is to replace 3 instances of:
Code:
str_replace(" ","",$str); Code:
preg_replace("/[^A-Za-z0-9]/","",$str); However, the 3 instances where str_replace appear look like this:
Code:
str_replace(" ","",$value);
str_replace(" ","",$value1);
str_replace(" ","",$value); - BenQ
Next Topics on Trending Feed
-
1