php <? if ($page != "..... Question - Adding another page

Discussion in 'PHP' started by misohoni, Jul 2, 2010.

  1. #1
    If for example my statement is:
    <? if ($page != "index.php"... 
    PHP:
    can I mention something like:

    <? if ($page != "index.php" AND "contact.php"
    PHP:
    ... so that the same conditions apply to another page?
     
    misohoni, Jul 2, 2010 IP
  2. gapz101

    gapz101 Well-Known Member

    Messages:
    524
    Likes Received:
    8
    Best Answers:
    2
    Trophy Points:
    150
    #2
    
    <? ($page != "index.php" && $page != "contact.php")
    
    // or 
    
    <? if(!in_array($page, array('index.php','contact.php')))
    
    PHP:
     
    gapz101, Jul 2, 2010 IP