Re[2]: [PHP] How to list 2-6 in while script?
| From: | Andrew Perevodchik | Date: | Wed, 12 Sep 2001 11:45:25 +0000 |
| Subject: | Re[2]: [PHP] How to list 2-6 in while script? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-67037@lists.php.net to get a copy of this message | ||
Hello! You wrote:
>> 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>";
>> }
while (list ($key,$val) = each ($headers) and
$key <= 6 and
$key >= 2) {
print "<p><b>"."$val"."</b></p>";
}
Eh?
--
Andrew Perevodchik
ok@naverex.kiev.ua