IF

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
cmxflash
-


Joined: 11 Dec 2004
Posts: 872

PostPosted: Sat Dec 24, 2005 1:12 pm    Post subject: IF Reply with quote

I'm too lazy to use Google, so I'm asking you guys.

How can I make the IF-function not case-sensitive?

I want it return true if the variabels are
$a = "abcde";
and
$b = "ABcDe";
Back to top View user's profile Send private message
MonkeyNation
-


Joined: 05 Feb 2005
Posts: 921
Location: Cardiff

PostPosted: Sat Dec 24, 2005 1:28 pm    Post subject: Reply with quote

Code:
function ismatch($input1, $input2) {
  if ($input1 == $input2)
    return true;
  return false;
}
function is_casematch($input1, $input2) {
  if ($input1 === $input2)
    return true;
  return false;
}
//And the purpose of this needlessly long example is: two equal signs are a match, three are a case sensitive match.

_________________
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group