Get foreach-result separated

Discuss coding issues, and scripts related to PHP and MySQL.
User avatar
JanMolendijk
Posts: 282
Location: Holland Rotterdam

Get foreach-result separated

Plessant Coursesweb
I`m still busy to read out colors my first tryout did not work.


In foreach code below I getting 20 results in once,
But I would like to have them separated into a code

Code: Select all

<?php
foreach ( $colors as $hex => $count )
{
	if ( $count > 0 )
	{
		echo "".$hex."";
	}
}
?>

MarPlo Posts: 186
Hello,
I didn't understand.
What data do you have in the $colors array, and what is the result you want to get.

JanMolendijk Posts: 282
Marplo, I coming back some later time on it.
Because I need to re-study the script.... Also, because the data from $colors (excuse).