Does anyone know a simple way to extract the month from the current date?
format YYYY-MM-DD
thanks in advance Blueman
Something like this ought to do it:
<?PHP $date = "YYYY-MM-DD"; list ($year, $month, $day) = split("-", $date); echo $month; ?>
Hey mate -
Few ways to do it obviously depending if you want leading zeros or not...
Full month names can be derived from the elements in the getdate() array.
Hope this helps -
Cheers
Gotcha!
thanks