chicobandito Posted November 7, 2011 Share Posted November 7, 2011 Looking to set current page to more than one option... Something that sets $currentPage to contact.php or thankyou.php... how can I modify this statement below? <li><a href="contact.php" <?php if ($currentPage == 'contact.php') {echo 'id="here"';} ?>>Contact</a></li> Thanks for your time! Link to comment https://forums.phpfreaks.com/topic/250593-how-can-i-add-an-or-to-this-line-of-code-currentpage-contactphp/ Share on other sites More sharing options...
chicobandito Posted November 7, 2011 Author Share Posted November 7, 2011 I think i found the answer, is this correct? I am using the operator "||" between the page options... ($currentPage == 'contact.php' || $currentPage == 'index.php') Link to comment https://forums.phpfreaks.com/topic/250593-how-can-i-add-an-or-to-this-line-of-code-currentpage-contactphp/#findComment-1285745 Share on other sites More sharing options...
KevinM1 Posted November 7, 2011 Share Posted November 7, 2011 Yes, || is the logical 'or' operator. Link to comment https://forums.phpfreaks.com/topic/250593-how-can-i-add-an-or-to-this-line-of-code-currentpage-contactphp/#findComment-1285748 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.