for loop user input - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

for loop user input

saitacsaitac Posts: 1Member

So I built a parser in PHP that runs through an excel spreadsheet with a flow chart of questions and feeds cell values into an array that I want to turn into multiple choice questions (each cell a unique question). I now need to present those questions to the user, retain their answer, and loop through the next array of questions (basically stepping down a row)... I put a for loop inside my question tree and if I could just present the end user with the questions from that array and have them pick I could do the rest. I tried using an HTML form but it won't take inside the for loop? I'm very noob but I just want to get this part working. The excel stuff all works and populates an array correctly.

The for loop would look something like the loop below with all the values within the $questions array being presented as multiple choice questions.

  for ($i=0; $i < count($questions); $i++){
      echo $i;  //only echo'd to see if it was counting correctly
  }
Sign In or Register to comment.