Re[2]: [PHP] How to list 2-6 in while script?

2001-09-12 Thread Andrew Perevodchik

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 pb.$val./b/p;
  }

while (list ($key,$val) = each ($headers) and
   $key = 6 and
   $key = 2) {

   print pb.$val./b/p;
}

Eh?

-- 
Andrew Perevodchik
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How to list 2-6 in while script?

2001-09-12 Thread Alexander Skwar

So sprach »Andrew Perevodchik« am 2001-09-12 um 14:45:25 +0300 :
 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 pb.$val./b/p;
   }
 
 while (list ($key,$val) = each ($headers) and
$key = 6 and
$key = 2) {
 
print pb.$val./b/p;
 }
 
 Eh?

Oh, if $key contains the number, than yes.  I understood his question
differently.

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: 2 days 7 hours 29 minutes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] How to list 2-6 in while script?

2001-09-11 Thread Jan Grafström

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 pb.$val./b/p;
 }
Thanks in advance.
Regards
Jan


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How to list 2-6 in while script?

2001-09-11 Thread Alexander Skwar

So sprach »Jan Grafström« am 2001-09-11 um 16:48:59 + :
 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 pb.$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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]