I'm looking for the PHP version of perls:
tr///
or an alternate method of doing the same thing.
Unfortunately, I've been searching but haven't turned up any matches primarily I suppose because "tr" is not a very searchable phrase, and everything else I've tried is too broad.
What I'm trying to do is simple to verify that a string only contains characters from a certain set, such as in perl I might do:
if ( tr/[a-zA-Z0-9]/cs ) { ... }
The only thing I've found in PHP so far is to preclude the existance of all other characters (which I think would not be a solution)...
Thanks for any help.
Scott