Re: need help breaking out of loop.

From: Date: Thu, 26 Jun 2003 11:25:31 +0000
Subject: Re: need help breaking out of loop.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-152954@lists.php.net to get a copy of this message
On Thu, 26 Jun 2003 13:00:45 +0200, you wrote: > What am I missing? At first glance >while ($i <= $number_of_days) > { > $issue_date = strftime("%Y-%m-%d", $current_date); > $issue_month = date("m", $current_date); > $issue_day = date("d", $current_date); > $issue_day_of_week = date("l", $current_date); > > // Check that $issue_date isn't Saturday or Sunday > > if ($issue_day_of_week == "Sunday" | $issue_day_of_week == "Saturday") if ($issue_day_of_week == 'Sunday' || $issue_day_of_week == 'Saturday') > { > continue; > } > > if ($issue_month == 1 & $issue_day == 1) if ($issue_month == 1 && $issue_day == 1) > { > $issue_number = 1; > $current_date = $current_date + 86400; > $i++; > $issue_number++; > continue; > } > $current_date = $current_date + 86400; > $i++; > $issue_number++; > }

« previous php.general (#152954) next »