Re: to evaluate ...
| From: | hugh danaher | Date: | Thu, 24 Jan 2002 06:20:28 +0000 |
| Subject: | Re: to evaluate ... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-81829@lists.php.net to get a copy of this message | ||
If your heart is set upon using $width1... then write your variable like in
the following:
for ($i=1;$i<=$some_end_number;$i++)
{
${"width".$i}="something width";
}
hugh
----- Original Message -----
From: "Jason Wong" <php-general@gremlins.com.hk>
To: "Thorsten Wandersmann" <pitu@caipy.de>; <php-general@lists.php.net>
Sent: Wednesday, January 23, 2002 6:42 PM
Subject: Re: [PHP] to evaluate ...
> On Thursday 24 January 2002 09:15, Thorsten Wandersmann wrote:
> > Sorry for bothering you, but I really didn't find answeres on dejanews
and
> > in the tutorial, or better, I did not see them.
> >
> > I need the following variables:
> >
> > $width1
> > $width2
> > $width3
> > .
> > .
> > .
> > $widthn
> >
> >
> > Because it is not shure, how many they are, I need to construct them.
> > And because I need them in a <form> as "name" I could not use arrays (or
> > did I miss something here???).
>
> Yes, you're missing something :) You can use arrays in forms, just use
names
> like "width[0]", "width[1]" etc.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
>
> /*
> Goto, n.:
> A programming tool that exists to allow structured programmers
> to complain about unstructured programmers.
> -- Ray Simard
> */
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>