Thanks for the examples Zak! I got it working.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hey John,
Actually, you don't seem to far off. You can use a string as a variable name
by enclosing the string in ${ }.
i.e: ${"foo"}
You should be able to write your loop as something like:
foreach($item as $value) {
// do some stuff
Thanks that did it!
"Martin Towell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Try adding curly braces around the var name, like this:
>
> for($i=0; $i
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.p
Try adding curly braces around the var name, like this:
for($i=0; $imailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 9:27 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Confusing array question ...
Hi, I have 1 primary array called $item containing 20 values each of whose
value is part
Hi, I have 1 primary array called $item containing 20 values each of whose
value is part of the name of 20 other arrays containing various number of
values. How can I cycle through the primary $item array using a foreach and
within that do a for on each of the 20 secondary arrays dynamically
inse
5 matches
Mail list logo