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

javascript - CasperJS/PhantomJS failing SSL handshakes on some sites even with --ssl-protocol=any -

codeigniter - Fatal error: Call to undefined function lang() in CI Merchant using CardSave -

python - Received unregistered task using Celery with Django -