So I have code that outputs the following:
$test = array('test1.txt' => '1 June 2015',
'test2.txt' => '1 June 2015',
'test3.txt' => '1 June 2015',
'test4.txt' => '1 June 2015',
'test5.txt' => '1 June 2015');
But instead of 5 files there are hundreds. How would I make it so the I can define the date outputted depending on the line number i.e.
If file 1-5 (first 5 files), then date = "1 June 2015". If file 6-8 (next 2 files), then date = "5 June 2015. Etc. Etc. How would I go about doing so?
Try This
Updated to requirement. Note You have to define the date against file number.