I have an array with anonymous elements. Elements are added to the array via php, like so:
$playlist = array(); while (databaseloop) { $playlist[] = $a_ti
A simple for loop with an increment of two. You might want to make sure that your array length is long enough for i+1, in case the length isn't divisible by 2!
for (i = 0; i+1 < array.length; i+=2) { name = array[i]; length = array[i+1]; }