I am having trouble in returning all rows from while loop. When checking with print\_r($item) it's returning all rows but when I user return in while loop it is only returning first row. I think that is because it is return the loop at the first time.

So how can I return all rows.. here is what I am trying

```
while($item = db_assoc($query)){

    return '<p>'.$item['title'].'</p>';
}

```

The while loop is within the class method and I have to return the value so can't use echo

Thanks a lot....