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
akimm
Forum Contributor
Posts: 460 Joined: Thu Apr 27, 2006 10:50 am
Location: Ypsilanti Michigan, formally Clipsburgh
Post
by akimm » Thu Jun 08, 2006 12:01 pm
Code: Select all
<?php
// set the default timezone to use. Available since PHP 5.1
date_default_timezone_set('EDT');
$date == date(l n d y g:i a);
?>
I would like / between n/d/y i tried using // but there was still a T_STRING_ERROR on line 4 any help?
bdlang
Forum Contributor
Posts: 395 Joined: Tue May 16, 2006 8:46 pm
Location: Ventura, CA US
Post
by bdlang » Thu Jun 08, 2006 12:03 pm
You've forgotten to enclose the format string in quotes:
Plus you were using the '==' comparison operator, not the '=' assignment operator.
PHP Manual:
date()
PHP Manual:
operators
akimm
Forum Contributor
Posts: 460 Joined: Thu Apr 27, 2006 10:50 am
Location: Ypsilanti Michigan, formally Clipsburgh
Post
by akimm » Thu Jun 08, 2006 12:06 pm
I can see clearly now, the stupidity is gone.
Thanks friend, I didn't realize it required the quotes:-)