php - How to add an HTML element after two record zii.widgets.CListView widget Yii -


 <?php $this->widget('zii.widgets.clistview', array(     'dataprovider'=>$dataprovider,     'summarytext'=>'',     'itemview'=>'_view', )); ?> 

i need output

__________________________ id   : 10    id   : 11 name : xxx   name : yyyy age  : 15    age  : 20 place: abc   place:xyz -------------------------- id   : 12    id   : 13 name : aaa   name : sss age  : 24    age  : 27 place: vvc   place:xzss -------------------------- 

how change _view.php this?

this voucher printing, need reduce paper cost, that's why seek solution.

you can use html posted mohit bhansali. you'll have add more css first:

.view {     float: left;     width: 250px; /* or other width */ } 

then in _view.php clear float on top, each second item. can use predefined $index variable:

<?php if($index!=0 && $index%2==0): ?>     <div style="clear:left"></div> <?php endif; ?> 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

java - More than one row with the given identifier was found: 1, for class: com.model.Diagnosis -