PHP resim kaynak değiştirme tarihine bağlı olan yardım?

0 Cevap php

What I want to do is show three images. The images that show up depend on the month. There should be an image for the previous month, the current month, and the next month.

Bu benim ne var ..

  //Dates
  $prevDate = date("M Y", strtotime("-1 months"));
  $currDate = date("M Y");
  $nextDate = date("M Y", strtotime("+1 months"));

  $prevMonth = $prevDate.date("M");
$currMonth = $currDate.date("M");
$nextMonth = $nectDate.date("M");

//Years
$prevYear = $prevDate.date("Y");
$currYear = $currDate.date("Y");
$nextYear = $nextDate.date("Y");


  echo '<img src="./images/' + $prevMonth + '_' + $prevYear + '.jpg"/>';

What I end up getting is "0" on the page. I havent worked with php for about 2 years so I am really rusty! any help?

Ne ben yapmak isterim o "december_2011.jpg" adlı görüntüleri bağlanmak zorunda olduğunu

0 Cevap