Re: problem while loop.

From: Date: Sun, 24 Feb 2002 18:09:50 +0000
Subject: Re: problem while loop.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-86000@lists.php.net to get a copy of this message
Jeff, The problem is most likely with incrementing $event_data. It's hard to say without seeing the rest of the code. Steven J. Walker Walker Effects www.walkereffects.com steve@walkereffects.com
I have a problem while loop that isn't terminating when it's supposed to. I can't figure out what the problem is, if I run a comparison inside the while loop it matches as it should, but for some reason the same comparison isn't working as the while loop expression. I get an infinite loop when I run this code. while(strtotime($event_date) <= strtotime($end_date)){ # test to see if the loop should of stopped. if(strtotime($event_date) <= strtotime($end_date)) echo "GO!!\n"; else echo "STOP!!!!!!!!!!!!!!!\n"; /* omitted code that finds the next $event_date */ } -- Jeff Bearer, RHCE Webmaster PittsburghLIVE.com 2002 EPpy Award, Best Online U.S. Newspaper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#86000) next »