Skip to content

Instantly share code, notes, and snippets.

@flaviors200
Last active June 10, 2019 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flaviors200/60ef8ffc32f9c38fa6ee945ea994fda3 to your computer and use it in GitHub Desktop.
Save flaviors200/60ef8ffc32f9c38fa6ee945ea994fda3 to your computer and use it in GitHub Desktop.
Loop statements: for
<?php
$colors = ['blu', 'giallo', 'verde', 'rosso', 'bianco'];
for ($i = 0; $i < count($colors); $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