The code I have tried is as follows:
Code: Select all
<?php
$timestamp = date ("U", mktime( 0,0,0,$_POST[month],$_POST[daynumber],$_POST[year]) );
?>If I run the code below after making $timestamp I get
27May2003
1040947200
27 Fri December 2002
30 Sat November 2002
Code: Select all
<?php
print $_POST[daynumber];
print $_POST[month];
print $_POST[year];
print "<br>";
print $timestamp;
print date( " d D F Y", $timestamp );
print date( " d D F Y ", mktime ( 0,0,0,date("D"),date("F"),date("Y")));
?>If not, could you please explain to me how to get the ordinal suffix for a certain number (eg for 1 it would be st, for 2 it would be nd and for 3 it would be rd, etc) without using a timestamp?
Thanks for any help
David