title: What causes: "Notice: Uninitialized string offset" to appear?
body: <p>I have a form that users fill out, and on the form there are multiple identical fields, like "project name", "project date", "catagory", etc. Based on how many forms a user is submitting, my goal is to:</p>
  
  <ol>
  <li>loop over the number of forms</li>
  <li>create individual SQL insert statements</li>
  </ol>
  
  <p>However, PHP throws me a NOTICE that I don't seem to understand:</p>
  
  <p><strong>Notice:</strong></p>
  
  <blockquote>
    <p>Notice: Uninitialized string offset: 1 ...dataPasser.php on line 90</p>
  </blockquote>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>$myQuery = array();
  
  if ($varsCount != 0)
  {
    for ($i=0; $i &lt;= $varsCount; $i++)
    {
      $var = "insert into projectData values ('" . $catagory[$i] . "', '" .  $task[$i] . "', '" . $fullText[$i] . "', '" . $dueDate[$i] . "', null, '" . $empId[$i] ."')";
      array_push($myQuery, $var);     
    }
  }
  </code></pre>
  
  <p>There are references to this issue I am having, but they are not exact and I am having trouble deducing where the actual problem stems from. I would greatly appreciate any help in understanding what is causing the array to not initialize properly.</p>