radio button syntax

P

phil

Hi,

I need some help with syntax. I have a quiz routine with
10 questions which uses radio button and the code for each
question currently looks like this:

<font color="#2B0055">
1. How much is a quarter worth?<br>
<input type="radio" name="q1" value="A">A. 5 cents<br>
<input type="radio" name="q1" value="B">B. 10 cents<br>
<input type="radio" name="q1" value="C">C. 1 cent<br>
<input type="radio" name="q1" value="D">D. 25 cents<br>
</font>
<p>

I want to place the questions in an array called "question
(10)" and the choices in an array "choice(40)". This way
I can have all my question and choices at the top of my
code making it eaiser to change the quiz. How would I
change the above to use these arrays?

For example, I want to replace "1. How much is a quarter
worth?" with the array element "question(0)" and "A. 5
cents" with "choice(0)", etc.....

Thanks for your help.

Phil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top