Jump to content
Updating IPB tonight Read more... ×

Archived

This topic is now archived and is closed to further replies.

craigbabe

How to kill Â?

Recommended Posts

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 `e

I 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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
I saw a lot of functions using str_replace like:

[code]
<?php
function cleanA($str){
   $Aarray= array('À','Â','Á','Ã','Ä','Å');
   $str = str_replace($Aarray,'A',$str);
  
   $aarray = array('à','á','â','ã','ä','å');
   $str = str_replace($Aarray,'a',$str);

   return $str;
}
?>
[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.