In Java, How do I get the current index for the element in Java?
for (Element song: question){
song.currentIndex(); //<<want the current index.
}
In PHP you could do this:
foreach ($arr as $index => $value) {
echo "Key: $index; Value: $value";
}