Php 在zend框架中获取错误

Php 在zend框架中获取错误,php,html,zend-framework,Php,Html,Zend Framework,以表格格式打印两个表格内部联接后的数据 我在以下代码中遇到以下错误: 分析错误:语法错误,中的文件意外结束 /home/bina/public\u html/studentzend/application/views/scripts/index/index.phtml 在线57 这是我的密码: <?php if (count($this->messages)) : ?> <ul id="messages"> <?php foreach ($this->m

以表格格式打印两个表格内部联接后的数据 我在以下代码中遇到以下错误:

分析错误:语法错误,中的文件意外结束 /home/bina/public\u html/studentzend/application/views/scripts/index/index.phtml 在线57

这是我的密码:

<?php if (count($this->messages)) : ?>
<ul id="messages">
<?php foreach ($this->messages as $message) : ?>
<li><?php echo $this->escape($message); ?></li>
<?php endforeach; ?>   </ul>
<?php endif; ?>
<div class="row">
<div class="span12">
    <a class="btn btn-primary" role="button" href="<?php echo $this->url(array('controller' => 'Index', 'action' => 'create')); ?>">Create Student</a>
    <h3>Recent Students</h3>

    <table class="table table-condensed">
        <thead>
            <tr>
                <th>#</th>
                <th>FirstName</th>
                <th>LastName</th>
                <th>Email</th>
                <th>Actions</th>
            </tr>
        </thead>
        <body>
            <?php
            if(empty($this->students))
            {
                echo "<tr>";
                echo "<td><center>NO records found</center></td>";
                echo "</tr>";
            }
            else  
            {
                //print_r($this->students);exit;
                $students=$this->students;
                $length=  sizeof($this->students);

                //echo $length;exit;

             for($i=0;$i<$length;$i++){ ?>
                <tr>
                <td><?php  echo $students[$i]['id']; ?> </td>
                <td><?php  echo $students[$i]['firstname']; ?> </td>
                 <td><?php  echo $students[$i]['lastname']; ?> </td>
                 <td><?php echo $students[$i]['email'];  ?></td>
                <td>
                        <a href="<?php  echo $this->url(array('controller' => 'index', 'action' => 'update', 'id' => $students->getId())); ?>">Edit</a> |
                        <a href="<?php  echo $this->url(array('controller' => 'index', 'action' => 'delete', 'id' => $students->getId())); ?>">Delete</a></td>
                </tr>


          <?php  } ?>

        </body>
    </table>
</div>

新生 # 名字 姓氏 电子邮件 行动 |

您的
else
语句缺少一个右括号

             <a href="<?php  echo $this->url(array('controller' => 'index', 'action' => 'delete', 'id' => $students->getId())); ?>">Delete</a></td>
            </tr>


        <?php  }} ?>
              //^-------- Add one there

//^--------在那里加一个