craigbabe Posted April 13, 2006 Share Posted April 13, 2006 Hey I have been working on getting rid of users cheating with my scripts. I was wondering how I can remove wierd character like  or `eI have tried using ctype_digit but cannot find away of removing it...Dies anyone know how? I know ther eis tonnes of those kinds of characters.. is there just a way i can only get the numbers out of a string? im baffled Quote Link to comment Share on other sites More sharing options...
michaellunsford Posted April 13, 2006 Share Posted April 13, 2006 looking for the ord() function? You'd probably have to make an array for str_replace, though. So, it might be the long way around. Quote Link to comment Share on other sites More sharing options...
eric1235711 Posted April 13, 2006 Share Posted April 13, 2006 I saw a lot of functions using str_replace like:[code]<?phpfunction cleanA($str){ $Aarray= array('À','Â','Á','Ã','Ä','Å'); $str = str_replace($Aarray,'A',$str); $aarray = array('à','á','â','ã','ä','å'); $str = str_replace($Aarray,'a',$str); return $str;}?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.