Display query result's single row of data in CodeIgniter view using array syntax [duplicate]
Let's say the query from my controller is $query. How can I display the data other than using this kind of code? foreach ($query as $row) { echo $row->student_id; } Any other than this because the query only has one row. Any way that can I access the returned array like this? $query['student_id'];
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.