Re: How to list 2-6 in while script?
| From: | Alexander Skwar | Date: | Tue, 11 Sep 2001 17:34:24 +0000 |
| Subject: | Re: How to list 2-6 in while script? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-66951@lists.php.net to get a copy of this message | ||
So sprach »Jan Grafström« am 2001-09-11 um 16:48:59 +0000 :
> Hi!
> I have this script and wonder how to change it to get it list only number 2 to number 6 and
> not each?
> while (list ($key,$val) = each ($headers)) {
> print "<p><b>"."$val"."</b></p>";
> }
Hmm
$i = 1;
while (list ($key,$val) = each ($headers)){
if (2 == $i || 6 == $i){
continue;
}
print $val;
$i++;
}
Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.digitalprojects.com | http://www.iso-top.de
iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 12 hours 20 minutes