Hi,
I'm using if ($a == $b) to see if $a matches $b, but it seems that there's a problem.
First, I set an array:
$cat = "Asia,America,Europe,Africa,Middle East";
$catlist = explode(",", $cat_a);
Now, I got this:
$catlist[0] = Asia
[1] = America
[2] = ...
[4] = Middle East
Then I would like to see if it matches any $category:
if ($catlist[$i]==$category)
$answer = "yes";
All strings work very well, except the word "Middle East". If i remove the space, it will work again.
How should i deal with the space in this string?
Please advise. Thanks a lot!