I am trying to show current date using PHP function strftime():
$date = strftime("%A, %d %B, %Y");
And then printing it like this in the code:
<?php echo $date; ?>
Somehow this is giving an error in the code. Can someone help?
It looks perfectly ok. Seems your error has nothing to do with this, but something else. What error you are getting?
You can use this function:
$date = date(”l, jS F, Y”);
Example:
Monday, 10th March, 2010
<code>
<blockcode>
<c>
<cpp>
<drupal5>
<drupal6>
<java>
<javascript>
<php>
<python>
<ruby>
<foo>
[foo]
It looks perfectly ok. Seems your error has nothing to do with this, but something else. What error you are getting?
You can use this function:
$date = date(”l, jS F, Y”);
Example:
Monday, 10th March, 2010
Post Comment