• support@answerspoint.com

how to print an array of objects in codeigniter- php?

536

I am facing a problem to fetch array in codeigniter

$data['one']=$this->db->query($sql1);
$data['tho']=$this->db->query($sql2);
$data['three']=$this->db->query($sql3);

I am trying to do this following code I am getting error

Fatal error: Call to a member function result() on a non-object in

If I do var_dump($data['one']); I am getting the following displayed:

Array
(
 [0] => stdClass Object
 (
  [date] => 2013-09-28
 )
 [1] => stdClass Object
 (
  [date] => 1970-01-01
 )
 [2] => stdClass Object
 (
  [date] => 2013-09-28
 ) 
)

0Answer


Your Answer

    Facebook Share        
       
  • asked 3 years ago
  • viewed 536 times
  • active 3 years ago

Hot Questions