Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Loop statement: for optimized
$colors = ['blu', 'giallo', 'verde', 'rosso', 'bianco'];
for ($i = 0, $count = count($colors); $i < $count; $i++) {
echo "$colors[$i]\n";
/** Output **
/ blu
/ giallo
/ verde
/ rosso
/ bianco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.