Re: For Loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



for($i=1; $i<100; $i++) {
	${'p'.$i.'name'} = 'whatever';
}

- jeff

On 20-Jun-06, at 6:14 PM, Albert Padley wrote:

I have a regular for loop - for($i=1; $i<100; $i++)

Within the loop I need to create variables named:

$p1name;
$p2name;
$p3name;
etc.

The integer portion of each variable name needs to be the value of $i.

I can't seem to get my syntax correct?

Can someone point me in the right direction?

Thanks.

Albert Padley

--
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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux