urtlking2jo Posted January 27, 2007 Share Posted January 27, 2007 What is the difference between using three equal signs versus two in an if statement? How do you know which to use? I think it may be related to my if statement not evaluating correctly. Thanks. Link to comment https://forums.phpfreaks.com/topic/35958-solved-or-versus-or-conditional-statements/ Share on other sites More sharing options...
ShogunWarrior Posted January 27, 2007 Share Posted January 27, 2007 The [b]==[/b] sign is for loose evaluations such as [b]8 == "8"[/b]. These two things we are evaluating are different because one is a string and one is a number, but using [b]==[/b] they are evaluated as the same.[b]===[/b] is for type-strict evaluations where the two items being compared must be the same type. Link to comment https://forums.phpfreaks.com/topic/35958-solved-or-versus-or-conditional-statements/#findComment-170531 Share on other sites More sharing options...
Orio Posted January 27, 2007 Share Posted January 27, 2007 See more info [url=http://www.php.net/manual/en/types.comparisons.php]here[/url].Orio. Link to comment https://forums.phpfreaks.com/topic/35958-solved-or-versus-or-conditional-statements/#findComment-170534 Share on other sites More sharing options...
urtlking2jo Posted January 27, 2007 Author Share Posted January 27, 2007 Wonderful, that solves my problem! Thanks! Link to comment https://forums.phpfreaks.com/topic/35958-solved-or-versus-or-conditional-statements/#findComment-170535 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.