> -----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

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

> --- [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 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 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
> [EMAIL PROTECTED]
> ***************************************
> 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
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to