Solved

If not 5

Posted on 2009-07-09
2
155 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
advertisement module in core php 4 89
html input clean up 3 32
Datepicker in PHP 9 14
PHP JSON Clean up 5 0
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…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

758 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

17 Experts available now in Live!

Get 1:1 Help Now