Ezio Posted August 24, 2013 Share Posted August 24, 2013 Hey guys, could someone explain to me the use of: 1. " === " e.g; ($i % 2 === 0 || $i % 5 === 0) 2. is there something like "$i+-" ? Link to comment Share on other sites More sharing options...
Ingolme Posted August 24, 2013 Share Posted August 24, 2013 If you know what == is, === is similar, but it also makes sure that the type of the two variables is the same: $a = 1;$b = "1";if($a == $ { // This statement evaluates to true because $a and $b are both 1 echo "A and B are both 1";}if($a === $ { // This statement evaluates to false because $a is a number and $b is a string echo "A and B are both 1 and are both the same type";} Link to comment Share on other sites More sharing options...
Ezio Posted August 24, 2013 Author Share Posted August 24, 2013 Thanks Ingolme. But what about the 2nd one? Link to comment Share on other sites More sharing options...
birbal Posted August 24, 2013 Share Posted August 24, 2013 2. N0 Link to comment Share on other sites More sharing options...
Ingolme Posted August 26, 2013 Share Posted August 26, 2013 What would $i+- do? Link to comment Share on other sites More sharing options...
Ezio Posted August 26, 2013 Author Share Posted August 26, 2013 nothing, that was a stupid question.. ..as "Birbal" replied there is nothing like "$i+-". Link to comment Share on other sites More sharing options...
astralaaron Posted September 9, 2013 Share Posted September 9, 2013 theres $i++ and $i-- $i+- seems like it would just remain the same if it did exist :-) Link to comment Share on other sites More sharing options...
Ezio Posted September 9, 2013 Author Share Posted September 9, 2013 Yeah right. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now