Wednesday, 3 September 2014

Foreach loop in CI - Array value display

To display Array values from control ( more than 1 row or records) PHP

use foreach($arravar as $arr) :

 <?php foreach($schedule as $sched) { $sched['col_name'] }
    ?>

End once all records are showed

-------------------------------------------------------------------

To display Array values from control only 1 row

use $arravar[0]['col_name']
 <?php echo $schedule[0]['schedule_child_id']; ?>
                              

No comments:

Post a Comment

Redux vs Redux Toolkit vs React Context

  These are often confused. Feature Redux Redux Toolkit Context API Purpose State management Simplifies Redux Shares values in Rea...