SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Current month + 1 ???

    Hi,
    i want to display the name of the current month + 1 in php, anyone know how this is done?

    e.g. Current month is 'March', i want to write 'April'

    Well, ideally i want to output the current month, the next month and the month after that...

    So it would say
    <div><h1>March</h1></div>
    <div><h1>April</h1></div>
    <div><h1>May</h1></div>

    Any help would be great

  2. #2
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    $start time();
    for(
    $i 1$i <= 12$i++){
        echo 
    date('M'$start) . '<br />';
        
    $start strtotime("next month"$start);

    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •