Re: [PHP-DB] Re: problems with variables

2003-02-04 Thread Mark
Just a quick correction... if the q part is static, I believe you should use $(q$i) rather than ${$q . $i} --- [EMAIL PROTECTED] wrote: OK, now I get it: $input = 'input type=hidden name=q' . $i . ' value=' . ${$q . $i} . ' . \n; print($input); This one isn't well known so

RE: [PHP-DB] Re: problems with variables

2003-02-04 Thread Ford, Mike [LSS]
-Original Message- From: Mark [mailto:[EMAIL PROTECTED]] Sent: 04 February 2003 14:38 Just a quick correction... if the q part is static, I believe you should use $(q$i) rather than ${$q . $i} Well, actually, I think you want ${'q'.$i} -- or even ${q$i} Cheers! Mike

[PHP-DB] Re: problems with variables

2003-02-03 Thread no-spam----me
Marcel [EMAIL PROTECTED] 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:

[PHP-DB] Re: problems with variables

2003-02-03 Thread Marcel
Sorry, I see that I've got the a's and q's mixed up. I'll try to clarify it some more by giving an example with 2 variables. $q1 = first_var; $q2 = second_var; for($i=1;$i=2;$i++) { echo input type=\hidden\ name=\q$i\ value=\$q$i\\n; } The output should now be: input type=hidden name=q1

[PHP-DB] Re: problems with variables

2003-02-03 Thread no-spam----me
OK, now I get it: $input = 'input type=hidden name=q' . $i . ' value=' . ${$q . $i} . ' . \n; print($input); This one isn't well known so don't forget it!! ;) Larry Marcel [EMAIL PROTECTED] wrote: Sorry, I see that I've got the a's and q's mixed up. I'll try to clarify it some