Get value from STDClass
问题 I'm using PHP and CodeIgniter. I ran a query using the following script: $query = $this->db->query('select login_id, date_created from prjsite_login'); $row = $query->result(); print_r($row); The result of the print_r is: Array ( [0] => stdClass Object ( [login_id] => admin [date_created] => 2018-04-04 13:18:42 ) ) Which is correct. Thou when I tried to fetch 1 object or value from stdClass using the following script: echo $query->login_id; I received an error below: A PHP Error was