create read more with php on yii framework

using a simple php code strip_tags and substr

 $isi = strip_tags(substr($data->description, 0, 200))."....";      
 echo $isi;  
 echo CHtml::link('View Detail', array('view', 'id'=>$data->id),array('class'=>'btn btn-success btn-small'));  

demo : www.lowongankerja.dewatatech.com

Comments

Popular posts from this blog

Data Flow Diagram (DFD)

flexigrid + php with add and edit button

VERIFIKASI SUARA MENGGUNAKAN METODE MFCC DAN DTW MENGGUNAKAN METODE MFCC DAN DTW (BAB II TINJAUAN PUSTAKA)