note 39381 deleted from function.strtotime by tomsommer

From: Date: Tue, 27 Jan 2004 07:24:21 +0000
Subject: note 39381 deleted from function.strtotime by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-64226@lists.php.net to get a copy of this message
Note Submitter: me AT ashleyhunt DOT co DOT uk ---- I wanted to get the date of the next "$day" so I could print it on automated tickets, using 'strtotime' 'next thursday' worked on one server, but not another. I then tryed 'this' instead of 'next'. <? if ($day == date('l')) { $next = ""; } else{ $next = "this "; // using 'this' instead of 'next' worked for me!? } $str = strtotime("$next$day"); // Get next DAY timestamp $validdate = date('d/m/Y', $str); // Echo date if preffered format ?> Hope this helps someone?

« previous php.notes (#64226) next »