Last active
May 24, 2017 04:50
-
-
Save YurePereira/4154a640ba8c85dc23e0d34494ca388f to your computer and use it in GitHub Desktop.
Usando o laço de repetição FOR, percorrendo um array 2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //Array de elemento | |
| $myArray = array(0, 1, 2, 3, 4); | |
| //Iterando item por item do Array $myArray | |
| for ($i = 0, $length = count($myArray); $i < $length; $i++) { | |
| echo 'Item índice: ' . $i . ', Valor: ' . $myArray[$i] . PHP_EOL; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment