Hi there. I was reading an ebook about PHP and I want to learn it and I encountered this:
[HIGHLIGHT="PHP"]The time is
<?php echo date('H:i:s');?>
and the date is
<?php echo date('j F Y');?>
[/HIGHLIGHT]
What does the H, i, s, j,F, Y mean?
I mean ok the :
H = Hour (I think 24 hour clock as it's capital)
s = seconds
Y= year
but how am I supposed to know the others? Do those mean anything? or just letters that the people that invented PHP chose?
PHP date question
Started by GMailGuy, Jan 15 2008 03:21 AM
11 replies to this topic
#1
Posted 15 January 2008 - 03:21 AM
|
|
|
#2
Posted 15 January 2008 - 04:01 AM
There's a description about the date()-function on this page, including descriptions of each letter...
PHP: date - Manual
PHP: date - Manual
#3
Guest_Jordan_*
Posted 15 January 2008 - 04:54 AM
Guest_Jordan_*
j = Day of the month without leading zeros
F = A full textual representation of a month, such as January or March
i = Minutes with leading zeros
When programming with PHP your best resource will be PHP: Hypertext Preprocessor
F = A full textual representation of a month, such as January or March
i = Minutes with leading zeros
When programming with PHP your best resource will be PHP: Hypertext Preprocessor
#4
Posted 15 January 2008 - 08:15 AM
Thanks :)
It's gonna be hard to remember all those letters...
It's gonna be hard to remember all those letters...
#5
Posted 15 January 2008 - 01:54 PM
I doubt anyone remembers all of them, I sure as heck don't. But you can always check the PHP manual for reference.
#6
Posted 15 January 2008 - 09:56 PM
I can't remember them at all. I always use the manual. But I'm not working with it often neither.
#7
Posted 21 January 2008 - 03:36 AM
Full descriptions of values is in php manual you can find online: PHP: date - Manual
www.jarmalavicius.lt | www.github.com/reekenx | www.twitter.com/reekenx
#8
Guest_Jaan_*
Posted 21 January 2008 - 06:18 AM
Guest_Jaan_*
#9
Guest_NeedHelp_*
Posted 24 January 2008 - 02:51 PM
Guest_NeedHelp_*
It is impossible to remember all of these. Once you know PHP you will use php.net more than anything else.
#10
Posted 25 January 2008 - 02:55 PM
Well, after 4 web developing I am using PHP manual very rarely... But still using :)
www.jarmalavicius.lt | www.github.com/reekenx | www.twitter.com/reekenx
#11
Posted 26 January 2008 - 01:38 PM
W3Schools Online Web Tutorials is good too ^_^
I'm an angel. I kill firstborns while their mamas watch. I turn cities into salt. I even, when I feel like it, rip the souls from little girls, and from now till kingdom come, the only thing you can count on in your existence is never understanding why.
-
Do you know how you got that dent, in your top lip? Way back, before you were born, I told you a secret, then I put my finger there and I said "Shhhhh!"
-
Quotes taken from The Prophecy (1995)
-
Do you know how you got that dent, in your top lip? Way back, before you were born, I told you a secret, then I put my finger there and I said "Shhhhh!"
-
Quotes taken from The Prophecy (1995)
#12
Posted 28 January 2008 - 06:05 AM
Gabriel, Jaan has already written this link 2 messages before you.
www.jarmalavicius.lt | www.github.com/reekenx | www.twitter.com/reekenx


Sign In
Create Account


Back to top









