Jump to content


Photo

How to kill Â?


  • Please log in to reply
2 replies to this topic

#1 craigbabe

craigbabe
  • Members
  • Pip
  • Newbie
  • 9 posts

Posted 13 April 2006 - 02:30 PM

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

#2 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 13 April 2006 - 02:44 PM

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.

#3 eric1235711

eric1235711
  • Members
  • PipPipPip
  • Advanced Member
  • 107 posts
  • LocationSão Paulo - Brazil

Posted 13 April 2006 - 02:44 PM

I saw a lot of functions using str_replace like:

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

   return $str;
}
?>

Programming is like building your own universe...
But let me ask you something:
Your world... It´s cool? Or it sucks?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users