Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14348

How to echo this array?

$
0
0
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?

Viewing all articles
Browse latest Browse all 14348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>