I have a php script that works great, but I want to echo a heading that lists the month it is for. The file names will have either a _01, _02, _03 etc. in them. I've created an array of $months, but I'm trying to figure out what the best way is to do this.
If file name contains _01, echo January. Else if file name contains _02, echo February. Anyone know of the best practice for this scenario?
foreach (glob("*.mov") as $filename)
$theData = file_get_contents($filename) or die("Unable to retrieve file data");
$months = ['_01', '_02', '_03', '_04', '_05', '_06', '_07', '_08', '_09', '_10', '_11', '_12'];