Re: help - WHILE in FOREACH
| From: | James Brennan | Date: | Wed, 08 Jan 2003 02:28:58 +0000 |
| Subject: | Re: help - WHILE in FOREACH | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-130683@lists.php.net to get a copy of this message | ||
The second set of quotes is actualy two single quotes with nothing in-between.
.loop
From: "Rick Emery" <remery@emeryloftus.com> Reply-To: "Rick Emery" <remery@emeryloftus.com> To: "James Brennan" <loopjunkie@hotmail.com>,<php-general@lists.php.net> Subject: Re: [PHP] help - WHILE in FOREACH Date: Tue, 7 Jan 2003 20:18:08 -0600 Is this your exact code? I ask, because the following should generate a parse error: echo "<option value = ''></option>"; You have 3 double-quotes ("). ----- Original Message ----- From: "James Brennan" <loopjunkie@hotmail.com> To: <php-general@lists.php.net> Sent: Tuesday, January 07, 2003 7:29 PM Subject: [PHP] help - WHILE in FOREACH The while statement is only executing correctly for the first run through the foreach loop. Why? Thanks, loop foreach($desc as $key=>$value) { printf("Show %s Description <select name='show%sDesc'>", $key, $key); echo "<option value = ''></option>"; while($row = mysql_fetch_row($show_names)) { printf("<option value='%s'>%s</option>", $row[0], $row[1]); } echo "</select><br>"; } _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php_________________________________________________________________ MSN 8: advanced junk mail protection and 2 months FREE*. http://join.msn.com/?page=features/junkmail