PDA

View Full Version : PHP help


Chelle
10th September 2003, 05:36 PM
Nano, FWC, anybody!

If an include <?php echo date(_DATE_FORMAT); ?> returns a full date format (September 10, 2003), what specifier or syntax is needed to show a short date value ie: (Sept-10-03)

:help:

Nanobot
10th September 2003, 05:50 PM
Well the variable _DATE_FORMAT is controlling the fact that you are showing the long date. Check where that is initialised and change it to "M-d-Y" which will give you Sep-10-2003. Or change the statement to read date("M-d-Y"). If you want to use a two digit year then change the Y to a y.

Chelle
10th September 2003, 06:04 PM
That was too easy :blush:

Thank you! :sunshine:

Nanobot
10th September 2003, 08:03 PM
For anyone wanting to play with PHP, and for those who use it and have not found this yet :D I tend to use the quick reference page on the php site. It has saved me a lot of hassle many many times.

You can find the quick reference here http://www.php.net/quickref.php

jema
10th September 2003, 08:09 PM
For anyone wanting to play with PHP, and for those who use it and have not found this yet :D I tend to use the quick reference page on the php site. It has saved me a lot of hassle many many times.

You can find the quick reference here http://www.php.net/quickref.php


php3 has so many functions, that use of this site is essential in my experience :) you just never know when there will already be a function to do something you would otherwise spend ages writing.

jema

Chelle
10th September 2003, 08:21 PM
Excellent resource Nano, thanks! /bookmarked :D