Jump to content


Photo

checking arrays casesensitive


  • Please log in to reply
4 replies to this topic

#1 scheols

scheols
  • Members
  • PipPipPip
  • Advanced Member
  • 113 posts

Posted 01 August 2006 - 05:56 AM

how can i check an array thats case sensitive?

like BDDDD bdddd BdDdD BDDdd bDbDD etc.. i want them to be able to check with a good wordfiller
Dont Piss me Off today

#2 hackerkts

hackerkts
  • Members
  • PipPipPip
  • Advanced Member
  • 593 posts
  • LocationSingapore
  • Age:18

Posted 01 August 2006 - 06:16 AM

Not sure is this what you looking for,
preg_match("/words/", "text here"); // case-insensitive

preg_match("/words/", "text here"); // case-sensitive


Regards,
hackerkts

To be a coder, you must learn how to think and not to give up so easily.


#3 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 01 August 2006 - 06:22 AM

You could run your array through strtolower() so everything will be in lowercase...

#4 scheols

scheols
  • Members
  • PipPipPip
  • Advanced Member
  • 113 posts

Posted 01 August 2006 - 06:30 AM

meh i wont do non of them -_-

str_ireplace() works nicely

<?
$s1 = array("http://invisionfree","invisonfree","invisionfree.com","http://invisionfree.com/","the","quick","brown", "fox", "jumped", "over", "the","lazy","dog");
$t[post] = str_ireplace($s1, "*BLEEP*", "$t[post]");
?>


Dont Piss me Off today

#5 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 01 August 2006 - 07:19 AM

Please refrain from using vulgar words on the forums, they're not necessary to convey your message. Thanks.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users