Welcome Guest, Not a member yet? Register   Sign In
How to echo this array?
#1

Hi guys,

I send an array $data['content'] into view.

and here are the content of this array.

Code:
array(2) {
 [0]=>
 array(5) {
   ["subj_id"]=>
   string(1) "1"
   ["subject_name"]=>
   string(7) "english"
   ["photo_url"]=>
   string(0) ""
   ["author"]=>
   string(5) "jason"
   ["date_created"]=>
   string(10) "0000-00-00"
 }
 [1]=>
 array(5) {
   ["subj_id"]=>
   string(1) "2"
   ["subject_name"]=>
   string(4) "math"
   ["photo_url"]=>
   string(0) ""
   ["author"]=>
   string(4) "anna"
   ["date_created"]=>
   string(10) "0000-00-00"
 }
}



Now how to echo 'subject_name' and 'author' using foreach?
Reply


Messages In This Thread
How to echo this array? - by iridion2015 - 10-10-2017, 05:13 AM
RE: How to echo this array? - by PaulD - 10-10-2017, 06:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB