Re: string question
| From: | Ignacio Vazquez-Abrams | Date: | Thu, 16 Nov 2000 19:59:05 +0000 |
| Subject: | Re: string question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-25768@lists.php.net to get a copy of this message | ||
On Thu, 16 Nov 2000, kmurrah wrote:
> I hope I can make myself clear on this question ... here goes.
>
> On the previous form, I input values for Q1, Q2, etc. Now, on
> the subsequent page, I want to write a "for...next" loop to look
> at each of those variables and act upon them.
>
> I've tried :
>
> $product = "Q" . $i ;
> $product_order = "\$" . $product ;
>
> to get a string which, I hope, contains "$Q1" or whatever....NOW how
> do I get the VALUE of that string, i.e. the value entered for Q1 on
> the form on the previous page?
>
> I apologize for the elementary question, but I'm AWFULLY confused.
>
> Thanks in advance,
>
> Kenn
>
Try:
$product_order=${"Q".$i};
--
Ignacio Vazquez-Abrams <ignacio@openservices.net>