Solved

If not 5

Posted on 2009-07-09
2
156 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
2 Comments
 
LVL 39

Accepted Solution

by:
Roger Baklund earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now