PDA

View Full Version : Day



gsnedders
01-24-2004, 12:43 PM
Can anyone write me a php script which says "Today is " followed by the day?

gammahelixx
01-24-2004, 12:50 PM
http://www.php.net/manual/en/function.date.php

This will have what you need. This is one of my most frequently looked up pages on the manual, I can't seem to remember alot of the date function's arguments, even though I use them nearly daily :)

gsnedders
01-24-2004, 01:02 PM
I don't know any php but for what this is being used for it needs to be in php so can some write me a script.

gammahelixx
01-24-2004, 01:04 PM
Example 1 and 2 have full working lines of code. Just pick which way you want it to look.

Nightfire
01-24-2004, 01:30 PM
Today is <?php echo date("l"); ?>

gsnedders
01-24-2004, 01:35 PM
Originally posted by Nightfire

Today is <?php echo date("l"); ?>

So I just put that in the .php page I take it.

Nightfire
01-24-2004, 01:43 PM
:) Yeah, just put it wherever you want it to show

gsnedders
01-24-2004, 03:50 PM
Thanks

gsnedders
01-25-2004, 01:14 PM
I have got this


<P><CENTER><FONT SIZE="+1" FACE="Arial">Today is <?php echo date("l"); ?> </FONT></CENTER></P>

but it is not working:confused:

gammahelixx
01-25-2004, 01:29 PM
Did you name the file index.php or pagename.php (whatever your page is named) instead of pagename.html?

Nightfire
01-25-2004, 02:09 PM
And is php enabled on your server?

me'
01-25-2004, 04:03 PM
And is it on a server, not being viewed locally?

gsnedders
01-25-2004, 04:32 PM
Originally posted by gammahelixx
Did you name the file index.php or pagename.php (whatever your page is named) instead of pagename.html?

That's the problem, thanks!