Re: problems with variables
| From: | no-spam----me at larrykagan dot com | Date: | Tue, 04 Feb 2003 02:24:37 +0000 |
| Subject: | Re: problems with variables | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-25391@lists.php.net to get a copy of this message | ||
Marcel <m.h.a.reuvekamp@student.utwente.nl> wrote:
Can you clarify? Possibly show how the result should look in the page after
parsing. I'm sure I can help but your question is a bit unclear.
> I want to pass some variables named a1, a2...aX in a form. So I wrote a
> couple of lines to do the trick:
> for($i=1;$i<=$X;$i++)
> {
> echo "<input type=\"hidden\" name=\"q$i\"
> value=\"$q$i\">\n";
> }
> But there is just one problem. How do I pass the correct value?
> This is what I want the loop to do:
> echo "<input type=\"hidden\" name=\"q1\"
> value=\"$q1\">\n";
> echo "<input type=\"hidden\" name=\"q2\"
> value=\"$q2\">\n";
> ...........
> ...........
> So I want to make the variables $q1 .. $qX from q$i
> Is this possible and if so, how?
> Thanks for your support,
> Marcel