title: Notice: Undefined Offset : 2 How to Solve?
body: <p>I am having undefined offset:2 errors at Line 11 and 12. This is the code from Line 6 - 15.</p>
  
  <pre><code>    if(isset($_POST['submit'])){
  
          $surveyID =$_POST['surveyCategory'];
  
          for($i=0; $i&lt;count($_POST['id']); $i++){
              $questionID = $_POST['id'][$surveyID][$i];
              $answer = mysql_real_escape_string(htmlspecialchars($_POST['answer'][$surveyID][$i]));
              mysql_query("INSERT INTO answers(survey_id, question_id, answer_body) VALUES   ('$surveyID', '$questionID', '$answer')") or die (mysql_error());
          }
      }
  </code></pre>