note 31573 added to migration4.variables

From: Date: Sat, 26 Apr 2003 17:16:41 +0000
Subject: note 31573 added to migration4.variables
Groups: php.notes 
Request: Send a blank email to php-notes+get-47142@lists.php.net to get a copy of this message
Payson Welch is correct I have a language file that is included from a common include file. I have to declare the globals before the include file and then AGAIN in the funtion!!!! // include language file global $lDays, $lDay, $lWeeks, $lWeek; include "/usr/www/users/foundry/Templates/language/$site_language.inc"; function format_length($nDays){ global $lDays, $lDay, $lWeeks, $lWeek; if($nDays > 0 && $nDays < 7): if($nDays == 1): $sDays = "$nDays $lDay"; else: $sDays = "$nDays $lDays"; endif; elseif($nDays >= 7): $w = ceil($nDays / 7); if($w == 1): $sDays = number_format($w,0) ." $lWeek"; else: $sDays= number_format($w,0) ." $lWeeks"; endif; endif; return $sDays; } -- http://www.php.net/manual/en/migration4.variables.php http://master.php.net/manage/user-notes.php?action=edit+31573 http://master.php.net/manage/user-notes.php?action=delete+31573 http://master.php.net/manage/user-notes.php?action=reject+31573

« previous php.notes (#47142) next »