Hi guys,
I send an array $data['content'] into view.
and here are the content of this array.
Now how to echo 'subject_name' and 'author' using foreach?
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?