1
У меня есть div (id = "first") и форма ("search-form") на моей странице
div показывает всю запись моей таблицы в базе данных. В форме пользователь может ограничить результат своим текстом в форме. Я хочу заменить новый div основным.
Zend Framework заменяет div другим div
Вид:
<div class="datagrid" id="first">
<table>
<tr>
<th>id</th>
<th>num</th>
</tr>
<?php
foreach ($this ->paginator as $key =>$value)
{
echo '<tr>
<td>'.$value->id.'</td>
<td>'.$value->num.'</td>
</tr>';
}
?>
</table>
</div>
</div>
<div class = "pagination">
<?php
echo $this->paginationControl($this->paginator,'Sliding','pagination.phtml');
?>
</div>
<div class= "search-form">
<?php
echo $this->form;
echo $this->errorMessage;
?>
</div>
<div class="datagrid" id = "last">
<table>
<tr>
<th>id</th>
<th>num</th>
</tr>
<?php
for ($i=0 ; $i<$this->rowCount; ++$i)
{
print '<tr><td>'. ($this->rowArray[$i]['id']).'</td>';
print '<td>'. ($this->rowArray[$i]['num']).'</td>';
}?>
</table>
</div>