Just a quick correction... if the "q" part is static, I believe you should use $(q$i) rather than ${$q . $i} --- no-spam----me@larrykagan.com 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 don't forget it!! ;) > > Larry > > > Marcel <m.h.a.reuvekamp@student.utwente.nl> wrote: > > 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" value="first_var"> > > <input type="hidden" name="q2" value=\"second_var"> > > > Hope you can help me, > > Marcel > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > ===== Mark Weinstock mark_weinstock@yahoo.com *************************************** You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing. -Stolen from the now-defunct Randy's Random mailing list. *************************************** __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php