![]() |
PHP experts how would you do this?
In perl say you did this:
$username =~ tr/[0-9a-zA-Z_\-]//csd; ( This would strip all but alphanumeric chars and _ and - chars ) What would be the equivelant in PHP? I can't seem to find one :helpme - Az |
eregi("^[A-Za-z0-9_-]+$",$foo) is what i use.
so just change that to eregi_replace $username = eregi_replace("^[A-Za-z0-9_-]+$","",$username) i didn't like relying on \w or \W (and i think i had some problems with it) |
Excellent thanks.. I'll give it a shot.
- Az |
All times are GMT -7. The time now is 05:41 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123