i have the var $products who reads the id and twelve products from a mysql row in a array. No i want that only the fields who have text will be displayd. I wrote it with a "for" and it works, but how can i tell the code to stop, after the array is getting empty? "p" is to generate the db field name who is p1, p2 and so on.
for($i=1; $i < count($products); $i++)
{
echo "<div>Produkt ".$i":</div>
<div>".$products["p".$i]</div>"
}