1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Code To Change Image In Calander

Discussion in 'PHP' started by Nagendraprasad, Feb 8, 2013.

  1. #1
    $month = Array("January", "February", "March", "April", "May", "June", "July",
    "August", "September", "October", "November", "December");
    $date =time () ;

    //This puts the day, month, and year in seperate variables
    $day = date('d', $date) ;
    $month = date('m', $date) ;
    $year = date('Y', $date) ;
    FOR($i=0,$i<11,$i++);
    {
    IF(date('m', $date)===$mn[$i])
    {
    ECHO 'this is correct';
    }
    }
    for($i=1,$i=12,$i++){
    if(........){
    echo 'image';
    }
    }
    what conition i have to write in if statement as month changes image should change..on top of calander
     
    Nagendraprasad, Feb 8, 2013 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    Please give more information, i'm not exactly getting what you want, can you draw an example?
     
    EricBruggema, Feb 9, 2013 IP
  3. Nagendraprasad

    Nagendraprasad Greenhorn

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #3
    i want the code...in which i have to impliment it in calander plugin...so that as day changes the image has to change
     
    Nagendraprasad, Feb 10, 2013 IP
  4. goldensea80

    goldensea80 Well-Known Member

    Messages:
    422
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    128
    #4
    Do you mean you have 12 images for 12 month and you want to display each image depend on what date is, right?
    I figure the easiest way is you have 12 images like: 01.png, 02.png, ..., 12.png. Then the code is just as simple as
    $mm=date('m');
    echo "<img src='$mm.png'>";
    Code (markup):
     
    goldensea80, Feb 13, 2013 IP
  5. Nagendraprasad

    Nagendraprasad Greenhorn

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #5
    can anyone pls help me how to write code for option pages for plugins in which it has to upload images and date to that particular image...actual idea is the logo of website has to change when date is changes as per system...
     
    Nagendraprasad, Feb 18, 2013 IP
  6. Nagendraprasad

    Nagendraprasad Greenhorn

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #6
    i want the code for data picker...and most important thing is how to link that date to the image if we upload it
     
    Nagendraprasad, Feb 20, 2013 IP