I have programed a function for counting Date:

function Datereturn()
  {
   $monthorder = Array ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
    $day = Date("j");
    $monthday = Date("t");
  $month = Date("n");
  $year = Date("Y");
  $current = 42 - ($monthday - $day);
  if ($current > $monthorder[$month])
   { $realday = $current - $monthorder[$month];
    $month = $month + 2;
     if ($month > 12)
      { $year = $year + 1;
       $month = $month - 12; }
                   }
  else
   { $realday = $current;
    $month = $month + 1;
     if ($month > 12)
      { $year = $year + 1;
       $month = $month - 12; }   }
  Return $realday;
  Return $month;
  Return $year;
           }


But when I want to echo out the result, I have typed:

Datereturn();
echo "$year, $month, $realday";

Then the server return:
Undefined variable year, month, realday

plz help!







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to