Come si ottiene l'indice corrente in un ciclo foreach
?Come posso ottenere l'indice dell'array attuale in un ciclo foreach?
foreach ($arr as $key => $val)
{
// How do I get the index?
// How do I get the first element in an associative array?
}
'$ chiave' È il indice corrente. – jason