T4VN is an online PHP Help community that provides PHP Tutorials, PHP Examples, PHP Scripts, PHP Support
    HOME  |  HOSTING COUPON  |  TEMPLATE  |  PHP SCRIPTS  |  LINK TO US  |  LINK  |  REGISTER | CONTACT
::: Member Login :::
 Username
 Password
 
Forgot your password ?
::: PHP Tutotal :::
  PHP Basic (7)
  PHP Advanced (4)
  PHP Database (2)
  Coding Step By Step (8)
  PHP and AJAX (0)
::: PHP Example :::
  Arrays (1)
  Code Highlighters (3)
  Database Functions (12)
  Date & Time (5)
  E-Mail (6)
  Forms (5)
  Guestbooks (1)
  Logging (2)
  Miscellaneous (10)
  Password Generators (3)
  Randomizers (3)
  String Manipulation (10)
  User Authentication (6)
::: Search On T4VN :::
::: T4VN Statistics :::
  PHP Scripts : 64
  PHP Example : 67
  PHP Tutorials : 21
  PHP News : 93
  Total Coupon : 36
  Other Tutorials :
  Member : 215
  Visitor Online : 3
  Today Visit: 129
  Total Visitor : 285995
  Most Online : 41
::: Sponsored Links :::

PR 4 For This Webpage

Vinaora Logo
Home Today :

Display Future Dates

Author : stevefug

Used to display future date(s) from a given date

PHP Example :

<?php 

/* ************************************************************

   Used to display future date(s) from a given date

   If you are displaying more than one date (i.e., $rep
   is greater than 0), each successive date displayed
   is increnmented by: 
     the total number of days ($nod)
   + the total number of months ($nom) 
   + the total number of years ($noy)

   ************************************************************/

$datstart "2003-07-21";  /* the starting date */
$rep 3;  /* number of future dates to display */ 
$nod 7;  /* number of days in the future to increment the date */
$nom 0;  /* number of months in the future to increment the date */
$noy 0;  /* number of years in the future to increment the date */

future_date($datstart,$rep,$nod,$nom,$noy); 

function 
future_date($datstart,$rep,$nod,$nom,$noy) {
  while (
$rep >= 1) {
    
$datyy=substr($datstart,0,4);
    
$datmm=substr($datstart,5,2);
    
$datdd=substr($datstart,8,2);
    
$fda=$datdd $nod;
    
$fmo=$datmm $nom;
    
$fyr=$datyy $noy;
    
$dat1=date("Y-m-d"mktime(0,0,0,$fmo,$fda,$fyr))."<BR>"
    echo 
$dat1
    
$datstart=$dat1
    
$rep--; 
  }



?>



Other Example
Simple Calendar
Time Convert Function
Date Convert Function


::: Resources :::
  Links Directory
  Programming 2 3
  Webmaster 2 3
  Web Design 2 3
  Web Hosting 2 3
  Other Links 2 3
  Asian ShowBiz News
  Teach Seo For You
::: New Templates :::




::: Other Tutorials :::
 Program Design

  Powered By T4VN.NET - Version 2.0 - CopyRight © T4VN.NET 2005-2007