Skip to content

Instantly share code, notes, and snippets.

@fabioluciano
Created September 13, 2011 18:31
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 fabioluciano/1214608 to your computer and use it in GitHub Desktop.
Save fabioluciano/1214608 to your computer and use it in GitHub Desktop.
teste
<?php
$nomes = array(1 =>'Cássio', 'Weslley', 'Fábio');
$tamanho_do_array = sizeof($nomes);
for($contador = 0; $contador <= $tamanho_do_array; $contador++) {
print $nomes[$contador] . PHP_EOL;
}
print '-------------------------------' . PHP_EOL;
while($tamanho_do_array) {
print $nomes[$tamanho_do_array] . PHP_EOL;
$tamanho_do_array--;
}
print '-------------------------------' . PHP_EOL;
foreach($nomes as $nome) {
print $nome . PHP_EOL;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment