PHP else/if statements

Posted by V Neal on Stack Overflow See other posts from Stack Overflow or by V Neal
Published on 2012-07-04T15:04:56Z Indexed on 2012/07/04 15:15 UTC
Read the original article Hit count: 260

Filed under:
|

I've written the following PHP statement but everytime i try to combine it into an else/if, it breaks.

Can someone please advise? I'm new to PHP and am getting a tad stuck.

Thanks :)

<?php if (is_page( 19 ) ) {?>
<div class="imageSlider"><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image.jpg" alt="" /><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image2.jpg" alt="" /><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image3.jpg" alt="" /></div>
<?php }?>

<?php if (is_page( 23 ) ) {?>
<div class="imageSlider"><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image.jpg" alt="" /><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image.jpg" alt="" /><img src="<?php echo bloginfo('template_directory');?>/Images/mainImages/innerPage-Image.jpg" alt="" /></div>
}
<?php }?>

© Stack Overflow or respective owner

Related posts about php

Related posts about elseif