date Function - String Formatting

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
Glycerine
Forum Commoner
Posts: 39
Joined: Wed May 07, 2008 2:11 pm

date Function - String Formatting

Post by Glycerine »

Hi -

New Guy - New forum to new - not new to php. You seem a stunning font of knowledge.

My question regards the date() function.

I would just like to know which characters need to be slashed out when printing. I have built a function which utilizes the date() function, and it see's the type of delimiter a user enters on input and replicates it in a specific format.

e.g
User enters "1/2/08" >> translates >> "01/02/2008"
User enters "1 2 08" >> translates >> "01 02 2008" etc...

The function has other specifics but I'm to lazy to type them. So anyone know which characters need slashing and which dont?

Hope it makes sense - English is my fist language I swear

Thanks In Advance
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Re: date Function - String Formatting

Post by kendall »

http://www.php.net/manual/en/function.date.php

the format characters for one.
Post Reply