Very nice solution. Thank you !
Plutarck schrieb:
> If the variable's names will be $Name1, $Name2, etc, then you'd do something
> like this:
>
> for ($i = 1, $i <= $n)
> {
> /* $n will be how many variables you have. So if you have 5 variables, $n
> should equal 5 */
> ${"Name" . $i} = $default
If the variable's names will be $Name1, $Name2, etc, then you'd do something
like this:
for ($i = 1, $i <= $n)
{
/* $n will be how many variables you have. So if you have 5 variables, $n
should equal 5 */
${"Name" . $i} = $default_value;
}
So if $n was 3 and $default_value was 0, you'd have thre
Hello !
I want to make a dynamic formular, on which the user can enter a
different number of names.
So to make the form I do:
for ($i = 0; $i < $anzahl; $i++)
{ printf ("\n", $i);
}
Now I want to set all the Varables Name0, Name1, Name2 etc. to a
default-value.
How can I do it in a for-next-l
3 matches
Mail list logo