Lassie Posted December 10, 2007 Share Posted December 10, 2007 I need to display different aspects of a layout depending on which page the current page is. I get a parse error with the following code. Where is my error please? <?php $curentPage = basename($_SERVER['SCRIPT_NAME']); if ($currentPage != 'index.php')&&($currentPage != 'checkout.php') {//do something }else{ do something else } Link to comment https://forums.phpfreaks.com/topic/81039-solved-logical-operator-problem/ Share on other sites More sharing options...
pocobueno1388 Posted December 10, 2007 Share Posted December 10, 2007 Try <?php $curentPage = basename($_SERVER['SCRIPT_NAME']); if (($currentPage != 'index.php')&&($currentPage != 'checkout.php')) { //do something }else{ //do something else } ?> Link to comment https://forums.phpfreaks.com/topic/81039-solved-logical-operator-problem/#findComment-411157 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.