Help with " Function " parameter

From: Date: Thu, 04 Apr 2002 15:21:27 +0000
Subject: Help with " Function " parameter
Groups: php.general 
Request: Send a blank email to php-general+get-91645@lists.php.net to get a copy of this message
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!

« previous php.general (#91645) next »