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
Steveo31
Forum Contributor
Posts: 416 Joined: Sun Nov 23, 2003 9:05 pm
Location: San Jose CA
Post
by Steveo31 » Mon Feb 09, 2004 12:33 am
I'm new, so please be gentle
I'm workin with EasyPHP which involves PHP 4.3 (I think) Apache and mySQL. So far so good, but theres an error over somethin I thought was the same.
Error code:
Code: Select all
<?php
$date=date("d-m-y")
echo "$date"
?>
No error Code:
Can someone explain why?
Dr Evil
Forum Contributor
Posts: 184 Joined: Wed Jan 14, 2004 9:56 am
Location: Switzerland
Post
by Dr Evil » Mon Feb 09, 2004 2:46 am
Steveo31 wrote:
Code: Select all
<?php
$date=date("d-m-y")
echo "$date"
?>
Can someone explain why?
Add semicolons to your code lines:
Code: Select all
<?php
$date=date("d-m-y");
echo "$date";
?>
That will do it !
Dr Evil
Steveo31
Forum Contributor
Posts: 416 Joined: Sun Nov 23, 2003 9:05 pm
Location: San Jose CA
Post
by Steveo31 » Mon Feb 09, 2004 9:36 am
AAGH! I was thinkin about it this morning, and that popped into my head. I'm used to Flash actionscript where it's not necessary. Thanks man.
-S