Re: Re: [PHP] incromenting $counter in a whloop

2003-02-09 Thread Sunfire
i got it tnx...
while(whatever){
//record code here
//and echo $counter

$counter++}


- Original Message -
From: Beauford.2002 [EMAIL PROTECTED]
To: Sunfire [EMAIL PROTECTED]
Sent: Sunday, February 09, 2003 2:14 AM
Subject: Spam: Re: [PHP] incromenting $counter in a whloop


 This is one way, or you could use a for loop.

 $counter = 1;

 While (whatever) {

 record code goes here
 echo $counter;
 $counter = $counter + 1;
 }
 - Original Message -
 From: Sunfire [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, February 09, 2003 12:37 AM
 Subject: [PHP] incromenting $counter in a whloop


  hi..
 
  was wondering how you would incroment $counter in a while loop.. i want
to
  print it out next to each record for a record counter on a web page...
 
 
 
 
 
  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] incromenting $counter in a whloop

2003-02-08 Thread Sunfire
hi..

was wondering how you would incroment $counter in a while loop.. i want to
print it out next to each record for a record counter on a web page...





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] incromenting $counter in a whloop

2003-02-08 Thread Jason Wong
On Sunday 09 February 2003 13:37, Sunfire wrote:
 hi..

 was wondering how you would incroment $counter in a while loop.. i want to
 print it out next to each record for a record counter on a web page...

manual  Language reference  Expressions

That should give you enough inspiration.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Schizophrenia beats being alone.
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] incromenting $counter in a whloop

2003-02-08 Thread John W. Holmes
 was wondering how you would incroment $counter in a while loop.. i
want to
 print it out next to each record for a record counter on a web page...

while(whatever)
{
  $counter++;
  echo You are on loop #$counter; 
}

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php