Re: Infinite Loop Issue

From: Date: Fri, 07 Nov 2008 03:45:06 +0000
Subject: Re: Infinite Loop Issue
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-283046@lists.php.net to get a copy of this message
To get to that point, you are doing a loop of size "X" where "X" = the row number being processed. ie row "2" is doing a foreach over 2 entries. row 15 is doing a foreach over 15 entries. row 90 is doing a foreach over 90 entries.
That's not QUITE right. The value of $issues will always be set to the column value for the next row when $all->fetch() is called, therefore overwriting the value it had after the previous iteration. The variable $row2 should be set to an empty array before the foreach loop just in case different rows have different numbers of issues.
You're right, I missed that $issues was a bind_result. -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.general (#283046) next »