php - CodeIgniter Unexpected EOF -


just trying display data database in view, , using foreach loop whenever put endif , endforeach it's written unexpected eof. guys, please dont understand made mistake, missing. start line

 <?php     if($get_data_from_db()->num_rows()>0){         foreach ($get_data_from_db->result() $row){ 

so. part problem whenever try close endif , endforeach it's writtent unexpected eof

<h2>informacije:</h2>  <div class="table-responsiv"> <table class="table table-bordered">     <tr>         <th>mjesto polaska: </th>           <th>mjesto odredista: </th>         <th>datum polaska: </th>         <th>datum povratka: </th>         <th>broj mjesta: </th>         <th>cijena: </th>     </tr>  </table>  </div>  <?php if($get_data_from_db()->num_rows()>0){     foreach ($get_data_from_db->result() $row){          ?>         <tr>             <td><?php echo $row->mjestopolaska;?></td>             <td><?php echo $row->mjestoodredista;?></td>             <td><?php echo $row->datumpolaska;?></td>             <td><?php echo $row->datumpovratka;?></td>             <td><?php echo $row->brojmjesta;?></td>             <td><?php echo $row->cijena;?></td>          </tr>       }    else{     ?>     <tr>     <td colspan="6">no data found</td>     </tr> }   ?>   <div class="post-body">     <hr>     <?php if ($this->session->userdata('user_id') == $posts['user_id']): ?>         <?= form_open('/posts/delete/' . $posts['id']) ?>         <a class="btn btn-default" href='posts/edit'<?= $posts['id'] ?>">edit</a>         <input type="submit" value="delete" class="btn btn-danger">          <?php echo form_close();  ?>     <?php endif ?> </div>  <hr> <h3>comments</h3>     <?php if($comments): ?>     <?php foreach ($comments $comment):?>     <div class="well">         <h5><?php  echo $comment['body']; ?>[by  <strong><?php echo $comment['name']?></strong>]</h5>      </div>             <?php endforeach;?>             <?php  else : ?>     <p>no comments display</p>  <?php endif;?>     <hr> <h3>add comment</h3> <?php echo validation_errors();?> <?php echo form_open('comments/create/'.$posts['id']); ?>  <div class="form-group"> <label>name</label> <input type="text" name="name" class="form-control">  <div class="form-group"> <label>email</label> <input type="text" name="email" class="form-control">  <div class="form-group"> <label>body</label> <textarea name="body" class="form-control"></textarea> </div>  <button class="btn btn-primary" type="submit">submit</button> <?php echo form_close(); ?> </div> </div> 


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -