Simple newbie problem, please help!

From: Date: Fri, 17 Nov 2000 16:07:23 +0000
Subject: Simple newbie problem, please help!
Groups: php.general 
Request: Send a blank email to php-general+get-25913@lists.php.net to get a copy of this message
Hi everyone, I have a simple loop problem. Let's say I have 10 quiz questions, and for each one I have a variable, i.e. q1answer, q2answer, etc... and in a for loop, I want to print them out in a table. So I do something like this: for ($i = 1; $i <= 10; $i++) { echo "<td width=\"25%\" bgcolor=\"#66CCFF\">"; echo "<p align=\"center\"><font face=\"Arial\" size=\"2\">VARIABLE HERE</font></td>"; My problem is I don't know how to construct the VARIABLE HERE part. I tried doing some kind of concatentation like q.$i.ans but that is obviously wrong. Can someone please steer me in the right direction... if an array is necessary, what needs to be done to get the 10 vars into the array? Thanks so much in advance, Omar

« previous php.general (#25913) next »