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 } Quote 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 } ?> Quote Link to comment https://forums.phpfreaks.com/topic/81039-solved-logical-operator-problem/#findComment-411157 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.