hi all
ive got a select menu that displays the week beginning dates for the next 3 weeks. eg mon 18th nov, mon 25th nov, etc.
ive got it so that it uses an array of 4 values for the date, and makes the 4 variables of the array the value of the selected item.
echo "<OPTION value=\"$dates[dayofweek] $dates[th]$dates[dayofmonth] $dates[month]\">$dates[dayofweek] $dates[th]$dates[dayofmonth] $dates[month]</OPTION>";
thats what each of the select items looks like. what it does is first get the system date before this, and then works out the next 4 week beginning dates. its probably not the best way to do it but it works for me fine. now i can refer to the selected item fine, and can echo the date selected no problems like so
echo "<BR>". $dates[month];
but how do i echo one of the array elements of the selected item??
ive tried these
echo "<BR>". $Datess[$dates[dayofmonth]];
echo "<BR>". $Datess[dayofmonth];
echo "<BR>". $Datess[dates[dayofmonth]];
just cant seem to get it to refer to one of the array elements of the selected item. can anyone help me with this?