老师我到现在都没找出来我这个代码有什么问题
<?php foreach ($tasks as $task) : ?>
<?php if ($task->completed) : ?>
<li>
<del><?= $task->description ?></del>
</li>
<? else : ?>
<li>
<?= $task->description ?>
</li>
<? endif; ?>
<?php endforeach; ?>
Parse error: syntax error, unexpected 'endforeach' (T_ENDFOREACH), expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) in F:\phpstudy\PHPTutorial\future\index.view.php on line 27
我都差点把你代码抄一遍下来了