0

I am working on a directory which has mp3 files in it. Directory name is outgoing_folder and it has mp3 files in it.

Here is the php code:

$audio_mp3 = outgoing_folder;
scandir($audio_mp3);
print_r(scandir($audio_mp3));  // Added Line#A for debugging purpose

Line#A prints the following:

Array ( [0] => . [1] => .. [2] => 36017P.mp3 [3] => 36031P.mp3 [4] => hello.mp3 )

The following html/php code output this 36017P.mp3

<td style="width:8%;text-align:center;"><?php echo $mp3_files[2];?></td>

Problem Statememnt:

I am wondering what changes I need to make in the php/html code above so that it print the name of all mp3 files. At this moment, it is printing the name of only particular file.

flash
  • 1,455
  • 11
  • 61
  • 132

0 Answers0