Using_the array_shift () Function
<?php $music = array ("A", "B", "C", "D"); while (count ($music)) { $somevalue = array_shift ($music); echo "$somevalue", "<BR>"; echo count ($music); echo "<BR>"; } ?>