brown2005 Posted September 6, 2006 Share Posted September 6, 2006 hi i was wondering if u could use to if satements together and how u do it?if($a == 5 AND $b == 5) Quote Link to comment https://forums.phpfreaks.com/topic/19876-can-u-use-ifa-5-and-b-5/ Share on other sites More sharing options...
AndyB Posted September 6, 2006 Share Posted September 6, 2006 [code]if (($a==5) && ($b==5)) { ... [/code] Quote Link to comment https://forums.phpfreaks.com/topic/19876-can-u-use-ifa-5-and-b-5/#findComment-86960 Share on other sites More sharing options...
brown2005 Posted September 6, 2006 Author Share Posted September 6, 2006 thanks very much Quote Link to comment https://forums.phpfreaks.com/topic/19876-can-u-use-ifa-5-and-b-5/#findComment-86961 Share on other sites More sharing options...
zq29 Posted September 6, 2006 Share Posted September 6, 2006 Note that you can also use 'AND' instead of '&&', but they have different priorities. Quote Link to comment https://forums.phpfreaks.com/topic/19876-can-u-use-ifa-5-and-b-5/#findComment-87034 Share on other sites More sharing options...
brown2005 Posted September 6, 2006 Author Share Posted September 6, 2006 wat are the different priorities Quote Link to comment https://forums.phpfreaks.com/topic/19876-can-u-use-ifa-5-and-b-5/#findComment-87035 Share on other sites More sharing options...
quillspirit Posted September 6, 2006 Share Posted September 6, 2006 Same question... what do you mean by different priorities? I have always used AND. Quote Link to comment https://forums.phpfreaks.com/topic/19876-can-u-use-ifa-5-and-b-5/#findComment-87098 Share on other sites More sharing options...
Kano Posted September 6, 2006 Share Posted September 6, 2006 I think SemiApocalyptic means different priorities like in maths times is calculated before add and brackets is done first etc... Quote Link to comment https://forums.phpfreaks.com/topic/19876-can-u-use-ifa-5-and-b-5/#findComment-87102 Share on other sites More sharing options...
AndyB Posted September 6, 2006 Share Posted September 6, 2006 http://ca3.php.net/manual/en/language.operators.php#language.operators.precedence Quote Link to comment https://forums.phpfreaks.com/topic/19876-can-u-use-ifa-5-and-b-5/#findComment-87107 Share on other sites More sharing options...
brown2005 Posted September 6, 2006 Author Share Posted September 6, 2006 ok ill have a look. thanks Quote Link to comment https://forums.phpfreaks.com/topic/19876-can-u-use-ifa-5-and-b-5/#findComment-87108 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.