Welcome Guest, Not a member yet? Register   Sign In
Trying to understand how to echo from array
#4

Actually, $this->db->query("...")->result() does not return an array, but an object.
If you do want an array, use $this->db->query("...")->result_array();
In order to output the results in your view, do this:
PHP Code:
<?php
foreach ($social as $soc) {
  echo 
$soc['social_name'];
}
?>
Reply


Messages In This Thread
RE: Trying to understand how to echo from array - by Wouter60 - 02-19-2016, 02:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB