下面的PHP調用工作正常,但也許有另一種更清晰的方式來顯示相同的?如何優化php語法
<?php if ($this['modules']->count('top-a')) : ?>
<?php if ($this['config']->get('warp_onlyhome')) : ?>
<?php $catid = JRequest::getInt('catid'); if ($catid == 0) : ?>
<section id="top-a" class="grid-block"><?php echo $this['modules']->render('top-a', array('layout'=>$this['config']->get('top-a'))); ?></section>
<?php endif ?>
<?php else: ?>
<section id="top-a" class="grid-block"><?php echo $this['modules']->render('top-a', array('layout'=>$this['config']->get('top-a'))); ?></section>
<?php endif; ?>
<?php endif; ?>
'' –
你問這樣的問題在這裏以前讀一本書或教程... – ducin