To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
Code CritiqueHaving someone critique your code is always a great way to hone the skills. Stop in and post your code to see what your peers may have done differently.
It works perfectly. First try, even! *pulls muscle patting self on back* I was just wondering if anyone could think of a more concise way of doing this.
yes, thank you. Unfortunately strtotime() does not know what to do with 2004-01-18. And in regards to date(), I believe I used it correctly in my example, but I am of course open to critiques...
thanks again.
__________________
Nice little planet ya got here. Be a shame if somethin' happened to it...
Thanks for the ideas guys. I think like how mine has it all layed out. I get too easily confused...
And I can't use "print date('F j Y', strtotime($a_row['date']));" because the whole reason i did this was to have three letter month names like Jan, Feb, etc ( pretty lame, huh? ).
cheers!
jason
__________________
Nice little planet ya got here. Be a shame if somethin' happened to it...
Last edited by jasonmills58; 01-18-2004 at 12:18 AM.
but I looked for that. I could have sworn it wasn't there. I thought to myself, "Self, there has to be a month abbreviator." but I couldn't find it. and it was right there the whole time.
*is most embarrased* but thank you moonglobe, i appreciate it.
so, is there a way to tell PHP that $a_row['eventdate'] is populated with a MySQL date value to shorten this:
Location: Rapid Offensive Unit "Foreign Object Damage"
Posts: 19,128
Quote:
Originally posted by jasonmills58 "Self, there has to be a month abbreviator." but I couldn't find it. and it was right there the whole time.
I was thinking "Who in their right mind has a use for 'B'?"
Quote:
so, is there a way to tell PHP that $a_row['eventdate'] is populated with a MySQL date value to shorten this:
Well, that's what [this] is doing . Here are three suggestions:
I tend to use sscanf() and list() rather than explode() and all that.
YYYY-MM-DD is a format that is recognised by strtotime().
You can have MySQL format the date to your specification before returning it with its own date formatting function.
__________________
On two occasions I have been asked [by Members of Parliament], "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.