Hello, I have a class that performs a query in the database:
$itemObra->listarItensObra($_GET['id'], 0);
I need to use this query several times and I would like the query to occur only once and the items to be stored in an array, and then use a foreach
to list.
foreach ($itemObra->listarItensObra($_GET['id'], 0) as $item) {
//....
}
Any idea is welcome!