Re: Nested for() loops?

From: Date: Fri, 06 Apr 2001 16:46:27 +0000
Subject: Re: Nested for() loops?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-47465@lists.php.net to get a copy of this message
A copy and paste into foo.php and then a php -q foo.php yielded results for me. --Joe On Fri, Apr 06, 2001 at 10:44:59AM -0600, jvoth@mobiltex.com wrote: > Howdy Y'all! > > I'm trying to figure out why I'm having so much difficulty with > nested for loops. > > As a test, I did this and it doesn't work. The script simply doesn't > give any output. > > <? > error_reporting(E_ALL); > > for( $i=0; $i<10; $i++ ) > for( $j=0; $j<10; $j++ ) > { > $res = $i * $j; > print(" result = $res <br>"); > } > ?> > > If I remove the inner loop then it works fine but that's useless. > > I am hoping to figure out how to make this work since I need to > populate a 2 dimensional array with results from multiple database > queries. > > Any ideas? Anything obviously wrong? > > Thanks in advance! > John > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net /******************************************************************************\ * Joe Stump - PHP/SQL/HTML Developer * * http://www.care2.com - http://www.miester.org - http://gtk.php-coder.net * * "Better to double your money on mediocrity than lose it all on a dream." * \******************************************************************************/

« previous php.general (#47465) next »