PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
AliasBDI
Forum Contributor
Posts: 286 Joined: Fri Nov 15, 2002 10:35 am
Location: Spring, TX, USA
Post
by AliasBDI » Wed Nov 19, 2003 3:23 pm
What is wrong with my code?
Code: Select all
<?php $today = now(); echo $today; ?>
Saethyr
Forum Contributor
Posts: 182 Joined: Thu Sep 25, 2003 9:21 am
Location: Wichita, Kansas USA
Contact:
Post
by Saethyr » Wed Nov 19, 2003 3:51 pm
try
Code: Select all
<?php
$str = strtotime('now');
echo date('l dS of F Y h:i:s A',$str);
?>
is an ASP directive as well if memory serves..
worked fine on my machine BTW
Saethyr
mchaggis
Forum Contributor
Posts: 150 Joined: Mon Mar 24, 2003 10:31 am
Location: UK
Post
by mchaggis » Wed Nov 19, 2003 4:14 pm
Code: Select all
<?php $today = date('Y-m-d H:i:s'); echo $today; ?>
will probably will have the desired affect you are after