I have this code snippet :
[code] echo "
$title |
Posted by: $posted_name$submitted Post date: $date $text $reaction |
Where the $date refers to a section at the top saying ‘get_date_archive’ which refers to a script in a file, ‘functions.php’. Here is the code :
[code]function get_date_archive($date) {
$year = substr($date, 0,4);
$month = substr($date, 4,2);
$day = substr($date, 0,4);
$day_array = array(“Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday”, “Sunday”);
$day_text = $day_array[$day - 1];
$month_array = array(“January”, “February”, “March”, “April”, “May”, “June”, “July”, “August”, “September”, “October”, “November”, “December”);
$month_text = $month_array[$month - 1];
return “$day_text $month_text $year”;
}[/code]
For some reason the result in my browser is that it is showing only
Post date; Month, Year (August 2004)
I want it to be :
Post date; eg: Wednesday, 11, March 2004
I think the error lies in the substrings but can anyone edit the code to make it work?[/code]