Hi
I have this simple bit of code:
$_entered_date = "05122009";
$_day = substr($_entered_date,0,2);
$_month = substr($_entered_date,2,2);
$_year = substr($_entered_date,4,4);
$_corrected_date = date("Y/m/d",strtotime($_year . "/" . $_month . "/" . $_day));
Obviously I can echo $_corrected_date to screen and get 2009/12/05.
I have recorded wav files for
each day of the week (Mon - Sun)
Each Month ( Jan - Dec)
Years ( 2009 - 2012)
How would I get the right combination of wav files based on the $_entered_date ??
I know how to use date() to get MON, TUE, JAN, FEB etc..
I know I could do a
if $day == "Mon" }wav="mon.wav"
if $day == "Tue" }wav="tue.wav"
etc through the days, months and years.. but there must be a simpler way !!
Thanks 🙂