Show textual Day for any date?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Vaughanjb
Forum Commoner
Posts: 26
Joined: Thu Jul 08, 2010 4:56 am

Show textual Day for any date?

Post 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
User avatar
AbraCadaver
DevNet Master
Posts: 2572
Joined: Mon Feb 24, 2003 10:12 am
Location: The Republic of Texas
Contact:

Re: Show textual Day for any date?

Post by AbraCadaver »

Code: Select all

echo date("l", strtotime($info['date']));
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Vaughanjb
Forum Commoner
Posts: 26
Joined: Thu Jul 08, 2010 4:56 am

Re: Show textual Day for any date?

Post by Vaughanjb »

Amazing, Thanks @AbraCadaver

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

Thanks again
Post Reply