Created
May 3, 2014 02:53
-
-
Save caioerick/1e0d5cc6763c2aa67aea to your computer and use it in GitHub Desktop.
This file contains 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 | |
$a = Array("Caio", " Erick", " Braga", " Costa"); | |
echo $a[0].$a[1].$a[2].$a[3]; // Imprimindo meu nome | |
for($i=0;$i<4;$i++) { | |
echo $a[$i]; | |
} | |
// Imprimindo meu nome com for(); | |
for($i=0;$i<count($a);$i++) { | |
echo $a[$i]; | |
} | |
// Imprimindo meu nome com for() e usando a função count() pra contar a quantidade de posições que existe no Array. | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment