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) 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] 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 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. 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 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. 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... 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 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 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
Archived
This topic is now archived and is closed to further replies.