Re: composed variables

From: Date: Mon, 19 May 2003 21:07:59 +0000
Subject: Re: composed variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-148206@lists.php.net to get a copy of this message
hello Jay! The idea behind is to have an universal script, which can handle different forms, which have a different amount of variables to post, based on a database. I get back the amount of fields needed (same amount as the database fields). Because I do not know the amount of variables out of the form I want to perform that while ... which gives back $var1=$_POST["val1"]; to $varx ... Better description? Thanx for your help! Mike "Jay Blanchard" <jay.blanchard@niicommunications.com> schrieb im Newsbeitrag news:C8F323573C030A448F3E5A2B6FE2070B02A142@nemesis... [snip] I am trying to create a composed variable: I get from a form the amount of variables back, eg. 4 I need now a way to perform something like while ($i >= $anzVar) { ... which creates variables: $var1, $var2 and so on. [/snip] Michael, I think we are going to need more information. Do you want to do something like this... For ($i = 1; $i < $anzVar; $i++){ $var[$i] = $var . $i; } HTH! Jay

« previous php.general (#148206) next »