Saturday, 24 August 2013

how to return an class without array in codeignaitor

how to return an class without array in codeignaitor

i have function that return me Class in Array like this :-
function getInfo($ev_id){
$query = $this->db->query("SELECT * FROM events,users
where events.ev_user_id = users.id
and ev_id = $ev_id");
$result = $query->result();
return $result[0];
}
this function is return me data Array, so i need use result to put it in
input type to show it for user.
i need to use :-
$eventinfo->ev_text
not use an fetch array to display it like $eventinfo->ev_text

No comments:

Post a Comment