[eluser]PrivateSniper[/eluser]
Ok despite all my efforts this particular code is starting to bug me, i've been following a tutorial, and I just cannot understand why this is not working, the error is showing as:
Quote:Parse error: syntax error, unexpected T_RETURN, expecting ')' in /model.php on line 15
(i have amended the url on this error message to hide my full path, can anyone please advise on why return is not working?
Code:
<?php
class Model extends CI_Model {
function __construct() {
parent::__construct();
}
function get(){
$q = $this->db->get('table');
foreach ($q->result() as $row {
$data[] = $row
}
return $data->result();
}
}
?>