RE: [PHP] help me please! :)
| From: | Kevin Porter | Date: | Mon, 10 Jun 2002 08:38:42 +0000 |
| Subject: | RE: [PHP] help me please! :) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-101373@lists.php.net to get a copy of this message | ||
You need to escape the dollar sign with a backslash to prevent PHP trying to
interpolate the variable $liv (which presumably doesn't exist).
echo "\$liv_$i";
HTH,
- Kev
> -----Original Message-----
> From: Veronica Ghezzi [SMTP:veronica.ghezzi@lucense.it]
> Sent: 10 June 2002 09:24
> To: Php-General
> Subject: [PHP] help me please! :)
>
> Hi,
> i must get the information saved in a several select list named
> liv_1 <select name="liv_1">
> liv_2 <select name="liv_2">
> liv_3 <select name="liv_3">
> ....
> liv_n <select name="liv_n">
>
> To get the value i work in this way...
>
> $n = 50;
> for ($i=1; $i<=$n;i++){
> ...
> echo "$liv_$i"; //// in asp i do: response.write
> (request("liv_" +
> i))
> ...
> }
> But i get only
> 1
> 2
> 3
> ...
> 50
>
> What can i do to get "$liv_1" ... "$liv_2"... ???
> Thank you a lot!
>
> Veronica Ghezzi
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
**********************************************************************