I've got the following code:

-----------

        while( list( $timeStamp, $elementArray ) = each(
$this->ErrorMessages )) {
          $tmpArray = $elementArray;

          if( $tmpArray[errorNumber] & $typesToDisplay ) {  // line to
comment out

            while( list( $elementKey, $elementValue ) = each( $elementArray
)) {
              if(( $elementKey == "contextvars" ) && ( $includeContextVars
)) {
                $retval .= "$elementKey: $elementValue\n";
                
              } elseif( $elementKey != "contextvars" ) {
                $retval .= "$elementKey: $elementValue\n";
                
              }
            }

          }  // Line to comment out

        }

----------

If I comment out the specified lines, the loops work perfectly
as they should.  It iterates only as many times are there are
elements in each of the associative arrays.  However, when
I uncomment out the specified lines, it creates an infinite loop.
Why?

Chris

Reply via email to