Get foreach-result separated
Discuss coding issues, and scripts related to PHP and MySQL.
-
JanMolendijk
- Posts: 267
- 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
-
Foreach JSON RESPONSE from Api
PHP - MySQL
First post
Hello, i have a JSON response from an api that is like this: mluci.com/script.php
I tried to transform this to an array but i can't foreach this.For...
Last post
I resolved with this thank you:
I changed the code but this send only an api request :
<?php
$servername = localhost ;
$username = mluci_api ;...