Post by tobychin » Tue Feb 07, 2012 5:52 am

Ok. What am I doing wrong?? I’ve got a field called “msrp” and only want it to display if it’s value is greater than 0. I have two products I’m comparing: one has a value of 605, the other = “0.0000”. Here’s my code…

Code: Select all

<?php if (!$msrp > 0) { ?>
<?php echo $text_msrp; ?> <span class="price-old"><?php echo $msrp; ?></span><br />
<?php echo $text_price; ?><?php if ($special) { ?> <span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span><?php } else { ?> <span class="price-new"><?php echo $price; ?></span><?php } ?>
There’s more to it, and I can post it, if you all need me to. I can get both fields to display. Or neither of them. It’s very frustrating. So, yeah. It's just the first IF statement. Any ideas? Thanks in advance...

- Toby
"The only way to get to the top is to get off your bottom." - Fortune Cookie

New member


Tue Jul 12, 2011 12:03 am
Location - Warsaw, Indiana
Who is online

Users browsing this forum: No registered users and 2 guests