Skip to content

Instantly share code, notes, and snippets.

@Bolinha1
Created October 30, 2012 12:14
Show Gist options
  • Save Bolinha1/3979850 to your computer and use it in GitHub Desktop.
Save Bolinha1/3979850 to your computer and use it in GitHub Desktop.
$arr = array(1,2,3);
foreach($arr as $key=>$value)
{
echo 'Esse é o indice ' .$key. 'esse é o valor do indice ' .$value;
}
$arr = array('n1' =>1,'n2'=> 2,'n3'=>3);
foreach($arr as $key=>$value)
{
echo 'Esse é o indice ' .$key. 'esse é o valor do indice ' .$value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment