当您使用endforeach;
, 你必须使用:
而是关闭{
启动时foreach
.
<ul class="project-extension-side-link">
<?php foreach($projectextensions as $projectextension) : // <--- ?>
<li <?php echo ($section==\'project-extension\' ? \'class="active"\': \'\'); ?>><span>Project 1</span></li>
<li><a href=""><?php echo $projectextension->post_title; ?></a></li>
<li><a href="">Project 3</a></li>
<li><a href="">Project 4</a></li>
<li><a href="">Project 5</a></li>
<li><a href="">Project 6</a></li>
<?php endforeach; ?>
</ul>
格里茨·比约恩