Questions tagged [strtotime]

PHP function for parsing about any English textual datetime description into a Unix timestamp

Samples

strtotime('first day of this month');
strtotime('last day of this month');
strtotime('-1 month'); # current date -1 month
1308 questions
-4
votes
2 answers

How can I get a PHP webpage to print every day of the year (2013)?

I am very new to PHP and I am trying to make a PHP webpage that prints out every day of the 2013 year like: January 1, 2013 January 2, 2013 ........... ........... December 31, 2013 I have been playing with different variations of this code below,…
-5
votes
1 answer

PHP 01/01/1970 Issues with Date Fields

I am extracting date from a string. Below is my code. I am getting only January 1, 1970 at the end. Please help me to fix this. your help would be appreciated. $current = 'DATE OF : 23/03/1951 BENCH:'; $DATEOF = preg_replace('/(.*)DATE OF…
-10
votes
1 answer

Warning on using strtotime in php?

Warning: mysql_result() expects at least 2 parameters, 1 given on this line $time = mysql_result( date('d F Y', strtotime($i["time_stamp"])));
1 2 3
87
88