Page 1 of 1

Show textual Day for any date?

Posted: Fri Aug 20, 2010 11:03 am
by Vaughanjb
I am pulling information from a database, one field containing a date.

I the date is display DD/MM/YYYY. Next to this I would like to show the textual date. E.g Monday.

Code: Select all

<? echo $info['date']; ?>
I have looked into this and found the date function coding. But how do I edit this so it works on any date.

Code: Select all

[syntax=php][syntax=php]echo date("l");
[/syntax][/syntax]

Any help given I will be very helpful

V

Re: Show textual Day for any date?

Posted: Fri Aug 20, 2010 11:18 am
by AbraCadaver

Code: Select all

echo date("l", strtotime($info['date']));

Re: Show textual Day for any date?

Posted: Fri Aug 20, 2010 11:25 am
by Vaughanjb
Amazing, Thanks @AbraCadaver

Didn't realise it would be that simple. Much appreciated.

Thanks again