GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   quick coding question (https://gfy.com/showthread.php?t=989556)

onedree 09-28-2010 07:23 AM

quick coding question
 
hello im trying to fix my script instead of having a payout maximum to have pay dates, my payments are 15th and 30th

so instead of having it show

Points needed:1234

how can i have it

Payments Start in 6 days

with something like

if $date>15 then echo Payment starts in 30-$date days
else echo payment starts in 15-$date days


what would be proper coding for that anyone know?

redwhiteandblue 09-28-2010 07:27 AM

You need something like

$a = getdate(time());

$day_of_month = $a["mday"];

Then you can test $day_of_month for a value from 1 to 31 giving the day of the month you're on.

HomerSimpson 09-28-2010 09:33 AM

Code:

if (date('j')>15) {
  // do something in here
}



http://www.awmzone.com/services


All times are GMT -7. The time now is 02:11 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123