Dynamic Arrays?
| From: | RealGM | Date: | Thu, 15 Mar 2001 09:37:55 +0000 |
| Subject: | Dynamic Arrays? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-43999@lists.php.net to get a copy of this message | ||
Hi,
I have a bit of a dilemma.
I have a number of array attributes, eg. $arrayname["var1"], $arrayname["var2"],
$arrayname["var2"], etc. up to 58, and I want to write these into the database.
What I am hoping to do is create a counter that goes through the insert routine, updating the
numerical value of "var". The problem is.. everything I have tried hasn't worked.
I have tried things like...
$counter=1;
$arrayname[["var".$counter1]];
$arrayname["var$counter1"];
...and variations thereof. Everything I have tried has failed.
PLEASE can someone help??