?
Solved

If not 5

Posted on 2009-07-09
2
Medium Priority
?
161 Views
Last Modified: 2012-05-07
Can someone please change this code to say if $row_WAATKroi['printer'] does not equal 5 show this html code <li class="t5"><a href="#p7EPMc1_5" id="p7EPMtrg1_5">Running Costs</a></li>

<?php if ($row_WAATKroi['printer'] ==5) { // Begin Show Region ?>
        <li class="t5"><a href="#p7EPMc1_5" id="p7EPMtrg1_5">Running Costs</a></li>
        <?php } // End Show Region ?>

Thanks
0
Comment
Question by:petewinter
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

Accepted Solution

by:
Roger Baklund earned 2000 total points
ID: 24814636
When testing if the value IS 5 you use == and when testing if it IS NOT 5, use != like this:
<?php if ($row_WAATKroi['printer'] != 5) { ?>
  <li class="t5"><a href="#p7EPMc1_5" id="p7EPMtrg1_5">Running Costs</a></li>
<?php } ?>

Open in new window

0
 

Author Closing Comment

by:petewinter
ID: 31601646
Many Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question