我已經寫了下面的PHP語句,但每次我嘗試將它合併成一個else/if,它會中斷。PHP else/if語句
有人能請指教嗎?我是PHP的新手,並且陷入困境。
謝謝:)
<?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 }?>
有什麼代碼,休息?你是怎麼做到的? – BBog
'<?php} else if(is_page(23)){?>'不適合你? (當然沒有'?><?php')。 – Wrikken