|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,484
|
PhP question: Last month
I have to get the last month is simple 1,2,3 format, but I cannot get to it:/
PHP Code:
![]()
__________________
seks.ai for sale - ping me |
|
|
|
|
|
#2 | |
|
Confirmed User
Industry Role:
Join Date: May 2002
Location: Toronto, Canada
Posts: 5,599
|
Quote:
if ($lastmonth == 0) {$lastmonth = 12;} There is a better way to do it using a mktime formula. http://www.php.net/date |
|
|
|
|
|
|
#3 |
|
Confirmed User
Join Date: Aug 2002
Posts: 160
|
I have not tested this but I'd expect it to work.
PHP Code:
|
|
|
|
|
|
#4 | |
|
Confirmed User
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,484
|
Quote:
Thanks though. |
|
|
|
|
|
|
#5 | |
|
Confirmed User
Industry Role:
Join Date: May 2002
Location: Toronto, Canada
Posts: 5,599
|
Quote:
You could try #php on EFNet (irc), or wait a few hours till i smoke another joint and have a coffee.. once i wake up i'll be able to process php code better ;) |
|
|
|
|
|
|
#6 | |
|
Confirmed User
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,484
|
Quote:
No Joe's version works well, but it is not what I had in mind I'll go with that though. |
|
|
|
|
|
|
#7 |
|
Confirmed User
Join Date: Aug 2002
Posts: 160
|
Forget my previous post. Here you go:
$lastmonth = date ("n",mktime (0,0,0,date("m")-1,date("d"), date("Y"))); and again I did not test this. |
|
|
|
|
|
#8 | |
|
Confirmed User
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,484
|
Quote:
|
|
|
|
|
|
|
#9 | |
|
Confirmed User
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,484
|
Quote:
|
|
|
|
|
|
|
#10 |
|
Confirmed User
Join Date: Jan 2003
Location: Austin, TX
Posts: 698
|
In case you're still having issues:
PHP Code:
|
|
|
|
|
|
#11 | |
|
Confirmed User
Industry Role:
Join Date: Jul 2001
Location: Utopia
Posts: 6,484
|
Quote:
![]() |
|
|
|
|
|
|
#12 |
|
Confirmed User
Join Date: Jan 2003
Location: Austin, TX
Posts: 698
|
If you have any questions, hit me up at 225006418 on ICQ and I can most likely give you a hand.
|
|
|
|