?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?Re: Format date from Database
Author:??(---.bluecom.no)
Date:???06-03-03 12:17

The best way to do this - is to use an array...
eg. like this one:
-------------------
$MonthName = array(
1 => "January",
2 => "February",
3 => "March",
4 => "April",
5 => "May",
6 => "June",
7 => "July",
8 => "August",
9 => "September",
10 => "October",
11 => "November",
12 => "December"
);

echo $MonthName[1];
-------------------

REMEMBER to replace the number in $MonthName[1] with the
variable - eg. if you store the month numer from the DB in the
variable $month then it should look like this: $MonthName[$month]

Read more about arrays in the php manual:
http://no2.php.net/manual/en/ref.array.php

?Topics Author? Date
?Format date from Database??new
Lu 06-03-03 11:43?
?Re: Format date from Database??new
? 06-03-03 12:17?
?Re: Format date from Database??new
Lu 06-03-03 12:44?
?Re: Format date from Database??new
bastien 06-03-03 20:21?
?Re: Format date from Database??new
Brandon Parise 06-04-03 13:27?
?Re: Format date from Database??new
Lu 06-06-03 08:05?
Go to Top??|??Go to Topic??|??Flat View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
????

Provided By
Phorum