Also, if you find yourself using a very long serious of if (x isin $2-) && (y isin $2-) && (z isin $2-) ..., you can achieve the same result with if ($count($1-,x,y,z)) or [/b]($countcs($1-,x,y,z))[/b].

You should also consider learning Regular Expressions which opens up a new world with $regex(), $regsub(), $regsubex().

if (!$regex($2-,/[A-Za-z0-9 ]/)) { return } is the equiv to the second question you asked. (though alphanum may also allow _ and - characters, so add them: /[A-Za-z0-9 _-]/)
((I don't need peanut gallery informing me of \w or /i, we're trying to ease him into regex.))


Well. At least I won lunch.
Good philosophy, see good in bad, I like!