$fruits = array(0 => “apple”, 1 => “orange”, 2 => “lemon” ); foreach($fruits as $key => $fruit) { printf(“%s is in index %s”, $fruit, $key); }
$fruits = array(0 => “apple”, 1 => “orange”, 2 => “lemon” ); foreach($fruits as $key => $fruit) { printf(“%s is in index %s”, $fruit, $key); }