我正在尝试执行如下代码
但在ul中显示错误 为
语法错误:预期:exit、if、标识符、变量、echo、do、while、for、foreach、endforeach、declare、switch、break、continue、function、return、try、throw、use、global、unset、isset、empty , 类, 接口, 数组, {, include, include_once, eval, require, require_once, print, ';', +, -, !, ~, ++, --, @, new, static, abstract, final, ( , $
我的代码是
<div class="footer">
<div class="footer_top">
<?php $helper = $this->helper('catalog/category') ?>
<?php $counts=$helper->getStoreCategories()->count(); ?>
<?php $cnt=0; $row=0; foreach ($helper->getStoreCategories() as $_category): ?>
<?php if(($i==0)&&($cnt<$count)) ?>
<?php $row++; ?>
<div class="footer_part">
<?php if($row==1):$no=4; ?>
<h2>Navigation</h2>
<?php else : $no=3; ?>
<h2></h2>
<?php endif ?>
<ul>
<?php endif; ?>
<li><a href="<?php echo Mage::getModel('catalog/category')->setData($_category->getData())->getUrl(); ?>" title="<?php echo $_category->getName() ?>"><?php echo $_category->getName() ?></a></li>
<?php $i++; if($i==$no):?>
<?php $i=0;?>
</ul>
</div>
<?php endif; ?>
<?php endforeach ?>
</div>
</div>
任何人请帮助我