-->

grouping array and adding them on CodeIgniter and PHP

grouping array and adding them on CodeIgniter and PHP
grouping


if you want to grouping array in php and summarize them on then create these script

<?php $a=array();
foreach($uraian as $k=>$i){
   $key = $i['Uraian'];
      if (!array_key_exists($key, $a)) {
         $a[$key]= array('Uraian'=>$i['Uraian'],'Total'=>$i['Total']);
      } else {
         $a[$key]['Total'] = $a[$key]['Total'] + $i['Total'];
      }
   }
$d['dt'] = $a; ?>

0 Response to "grouping array and adding them on CodeIgniter and PHP"

Posting Komentar

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel