php - Display rows including empty rows in symfony 1 -


i'm newbie in web development, , want modify existing project.i want display rows including null value,a default value of 0 or empty one.this code in action..

public function executedetails(sfwebrequest $r) {     if($this->getuser()->hasattribute('extend_term_ch')) {         $this->getuser()->getattributeholder()->remove('extend_term_ch');     }     $this->loan = doctrine_core::gettable('loans')->findonebyid($r->getparameter('id'));     $this->debits = doctrine_core::gettable('creditlogs')->getbyloanid($r->getparameter('id')); } 

and in templates

<?php $totalamount = 0 ?>     <?php foreach($loan->collections $i=>$c): ?>     <?php $totalamount += $c->amount ?>     <tr class="<?php echo ($i%2==0)?'even':'odd' ?>">         <td>             <?php echo $c->mode_of_payment ?>             <?php if($c->mode_of_payment == 'cheque'): ?>                 <?php $creferencedobj = $c->cheques ?>                 <div class="small_detail info">                     <span class="bold">(<?php echo $creferencedobj->bank ?>, <?php echo $creferencedobj->branch ?>) <?php echo $creferencedobj->reference_number ?></span>                 </div><br />             <?php endif; ?>             <?php $replaced = $c->getreplacedcheque() ?>             <?php if(!empty($replaced)): ?>             <div class="small_detail info">                 payment <span class="bold">(<?php echo $replaced->bank ?>, <?php echo $replaced->branch ?>) <?php echo $replaced->reference_number ?></span>             </div><br />             <?php endif; ?>         </td>         <td><?php echo $c->batch_no ?></td>         <td>             php <?php echo number_format($c->amount, 2) ?>             <?php if($c->mode_of_payment == 'cheque' && !empty($c->cheques->replaced_with)): ?>                 <?php $replaced = $c->cheques->replaced ?>                 <div class="small_detail info">                     replaced <span class="bold">(<?php echo $replaced->bank ?>, <?php echo $replaced->branch ?>) <?php echo $replaced->reference_number ?></span>                 </div>             <?php endif; ?>         </td>         <td><?php echo date('f d, y', strtotime($c->date_created)) ?></td>         <td><?php echo $c->created_by ?></td>         <td><?php echo $c->date_created ?></td>         <td>             <?php if(in_array($c->mode_of_payment, array('cheque', 'atm', 'direct bank transfer'))): ?>             <span class="info">                 <a href="<?php echo url_for('loans/view_collection_details?id='.$c->id) ?>?height=350&width=500" class="thickbox">view details</a>             </span>             <?php else: ?>             <div class="small_detail info">                 collector: <span class="bold"><?php echo $c->collectors->lastname.', '.$c->collectors->firstname ?></span>             </div>             <?php endif; ?>             <?php if(in_array($loan->mode_of_payment, array('cash', 'atm')) && $sf_user->hascredential('collections_rollback')): ?>                 <div class="small_detail bullet_go">                     <a href="<?php echo url_for('loans/rollback?id='.$c->id.'&loan_id='.$loan->id) ?>" onclick="return confirm('are sure? cannot undone!')">rollback collection</a>                 </div>             <?php endif; ?>         </td>     </tr>     <?php endforeach; ?>     <tr>         <td colspan="6">total paid</td>         <td>php <?php echo number_format($totalamount, 2) ?></td>     </tr> 

this display rows data..how displaying empty row?for example person has pay debts in 40 days april 1, 2014 march 10,2014, reason, did not pay april 4, 6, 8 , on.i want display dates 4, , 6 , 8 , display errors every date failed pay "no payment date".

some table


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -