That was the problem. I need the ! statement at the beginning of both conditions. So in the end the following did the trick: <?php if (!(arg(1) == '39' || arg(1) == '49')): ?> <div> Content </div> <?php endif; ?>
Thank you so much for all your help everyone.
On Mon, Jul 12, 2010 at 8:17 AM, Earnie Boyd earnie@users.sourceforge.netwrote:
Chris McCreery wrote:
Right now I have this:
<?php if (arg(1) != '39'): ?>
<div> Content </div> <?php endif; ?>
This works just fine but when i try to add in a second arg(1) and OR statement it doesn't work. Any ideas?
I made this mistake often when I first started programming. Use AND and not OR when using !=. Or you could use the alternative method as show below.
<?php if (arg(1) != '39' && arg(1) != '49'): ?>
<div> Content </div> <?php endif; ?>
ALTERNATIVE:
<?php if (!(arg(1) == '39' || arg(1) == '49')): ?>
<div> Content </div> <?php endif; ?>
-- Earnie -- http://progw.com
-- http://www.for-my-kids.com
[ Drupal support list | http://lists.drupal.org/ ]