php - Filling a div with the current time -


in header of page want insert div contains current date. not sure if jquery can handle (perhaps php) better way go.

i want populate div in header of page current date in format (example) 20th august 2013.

you can use php's built-in date() function purpose:

<div id="foo">  <?php echo date('ds f y'); ?> </div> 

output:

23rd august 2013   

documentation: date()


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -