Jump to content

Archived

This topic is now archived and is closed to further replies.

jeffpoulsen

Centering "date" statement

Recommended Posts

Just starting to learn PHP on my own.
I have a simple question. I have a simple line in and cannot get it to "echo" in the center of the page. The line is:

echo date('M j g:i:a');

I don't want to put the code in a table but for this simple task I would rather not. I can get this to work for the preceding line:

echo "<center>The Date and Time is</center>";

But not for the line above. I can find no answers at this stage. Can anyone help?

Share this post


Link to post
Share on other sites
[code]echo "<center>The Date and Time is<br/>". date('M j g:i:a'). "</center>";[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.