I want to pass a mySQL result from a function and print the data. How to do so ?
<?php
function showLatestItems()
{
$result = $this->query("SELECT aid,name,description,img,amount,strtdate,enddate FROM item WHERE enddate>now()");
return $result;
/* while($row=mysql_fetch_array($result))
echo $row[0].' '.$row[3].' '.$row[1].' '.$row[2].$row[4].$row[5].$row[6].'<br>';
*/
}
?>