AW: AW: [PHP] textfield vaules not accessable??

From: Date: Tue, 29 Aug 2000 17:43:39 +0000
Subject: AW: AW: [PHP] textfield vaules not accessable??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-14192@lists.php.net to get a copy of this message
for($i = 0; $i < $loop_count; $i++){ $content="textfieldname".$i; <---- builds variables like $textfield1, $textfield2 .... echo "content : ${$content}\n"; <----- ${$variable} read the content of the build variable } > -----Ursprüngliche Nachricht----- > Von: bemorph [mailto:info@bemorph.de] > Gesendet am: Dienstag, 29. August 2000 19:42 > An: info@bemorph.de > Cc: GENERAL LIST > Betreff: AW: AW: [PHP] textfield vaules not accessable?? > > on the next page you will need a variable variable to access > the variables: > > for($i = 0; $i < $loop_count; $i++){ > $content="textfieldname".$i; > echo "content : ${$content}\n"; > } > > > -----Ursprüngliche Nachricht----- > > Von: bemorph [mailto:info@bemorph.de] > > Gesendet am: Dienstag, 29. August 2000 19:39 > > An: Joao Prado Maia > > Cc: GENERAL LIST > > Betreff: AW: AW: [PHP] textfield vaules not accessable?? > > > > > > ok, you are right! > > that's the way: > > > > for($i = 0; $i < $loop_count; $i++){ > > $label="textfieldname".$i; > > echo "<input type='text' name='$label' > > value='$grade'>\n"; > > } > > > > > > > -----Ursprüngliche Nachricht----- > > > Von: Joao Prado Maia [mailto:jpm@kefta.com] > > > Gesendet am: Dienstag, 29. August 2000 19:34 > > > An: bemorph > > > Cc: GENERAL LIST > > > Betreff: Re: AW: [PHP] textfield vaules not accessable?? > > > > > > On Tue, 29 Aug 2000, bemorph wrote: > > > > > > > you have to name the fields this way: > > > > > > > > for($i = 0; $i < $loop_count; $i++){ > > > > $label="textfieldname".$i; > > > > <input type='text' name='label' > > > > value='$grade'> > > > > } > > > > > > > > Then you will get the same as: > > > > > > > > <input type='text' name='textfieldname1' > > > > value='$grade'> > > > > <input type='text' name='textfieldname2' > > > > value='$grade'> > > > > <input type='text' name='textfieldname3' > > > > value='$grade'> > > > > > > > > and so on! > > > > Is this your solution? > > > > > > Actually what he will get is a nasty parse error. Where's your echo / > > > print function inside that loop ? > > > > > > Joao > > > > > > > > > -- > > > Joao Prado Maia > > > Web Developer > > > Kefta.com, Inc > > > > > > > > > -- > > > 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 > > > > > > > > > -- > > 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 > > > > > -- > 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 >

« previous php.general (#14192) next »