What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Help with Local time PHP code

Help with Local time PHP code
Author: Message:
rav0
Veteran Member
*****

Avatar
i have an avatar

Posts: 1419
Reputation: 29
35 / Male / Flag
Joined: Aug 2003
RE: RE: RE: Help with Local time PHP code
quote:
Originally posted by rix
I'm not sure, did I understand you correctly, but why don't you just use simple PHP date functions? You can easily show time by doing this:
code:
echo date("H:i:s");

quote:
Originally posted by Salem
Yeh, but im totally new to PHP. If some can help i'd be very greatful

You must rename your files to something.php, they can't be something.html for PHP to work (except for exceptions). Sorry if you already knew this.

Inside a file called something.php, put this:
code:
<?php
echo date('g:i A');
?>
Wherever in the file you put it, PHP shpuld make it come out like 12:35 PM (the current time).

Instead of g:i A, you can put other things to have the time in a different format. Refer to date in the PHP manual for the parameters you can use.

Though if you are having problems still, maybe the time is not working on the server.
| [Image: dorsh] |

(\ /)
(O.o)
(> <)

This is Bunny. Copy Bunny into your signature to help him on his way to world domination
12-31-2005 01:44 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Help with Local time PHP code - by Salem on 12-30-2005 at 04:04 PM
RE: Help with Local time PHP code - by rix on 12-30-2005 at 04:14 PM
RE: RE: Help with Local time PHP code - by Salem on 12-30-2005 at 04:17 PM
RE: Help with Local time PHP code - by hmaster on 12-30-2005 at 04:54 PM
RE: RE: RE: Help with Local time PHP code - by rav0 on 12-31-2005 at 01:44 AM
RE: RE: RE: RE: Help with Local time PHP code - by Salem on 01-01-2006 at 08:19 PM
RE: Help with Local time PHP code - by Ezra on 01-01-2006 at 08:49 PM
RE: RE: Help with Local time PHP code - by Salem on 01-01-2006 at 08:54 PM
RE: Help with Local time PHP code - by hmaster on 01-01-2006 at 10:26 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On