Get foreach-result separated

Discuss coding issues, and scripts related to PHP and MySQL.
User avatar
JanMolendijk
Posts: 259
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
Hello,
I didn't understand.
What data do you have in the $colors array, and what is the result you want to get.

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

Similar Topics