set it to a variable and it should be ok:

$now = strtotime("now");

from there you can format it however you want:

echo date("F j, Y",$now);

php.net/date will give you the different masks for the date() function.







  -----Original Message-----
  From: [email protected] [mailto:[EMAIL PROTECTED]
Behalf Of Charlie Markwick
  Sent: Tuesday, November 20, 2007 9:09 AM
  To: [email protected]
  Subject: [php_mysql] New to dates in PHP


  I want to get the current Unix time stamp.

  Fist I tried the example from the PHP site:-

  strtotime("now")

  This kills the PHP and I end up with a blank page with absolutely no
  HTML

  So the I tried:-

  strtotime(date("d/m/Y"))

  This produced a null result but didn't crash the page. I'm tearing
  what's left of my hair out, can anyone advise me what I'm doing wrong?

  Charlie


  
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.16.1/1140 - Release Date: 11/19/2007
7:05 PM


[Non-text portions of this message have been removed]

Reply via email to