addeye

parsingdataarray

Sep 19th, 2016
81
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //controller
  2. foreach($data['divisi'] as $key=>$d)
  3. {
  4.     $data['divisi'][$key]->kode_devisi = array('datasatu' => $d->bla1,'datadua' => $d->bla2 );
  5. }
  6.  
  7. //view
  8. foreach($divisi as $row)
  9. {
  10.     echo $row->blabla;
  11.     foreach($row->kode_devisi as $d)
  12.     {
  13.         echo $d->datasatu;
  14.     }
  15. }
RAW Paste Data