PHP getmonth function

PHP doesn’t offer getmonth, getday or getyear.

Instead use this:

$unixtime = strtotime($test);
echo date(‘m’, $unixtime);
echo date(‘d’, $unixtime);
echo date(‘y’, $unixtime );

strtotime creates a unix style time (The number of seconds since some point in time around 1970)

Once you have that, you can use the date function as shown.