Undefined offset with an array
<p>Why can't I use variable which contains a number to specify an array value:</p>

<pre><code>$info(array)
$mySQLHeadings(array)

$infoString(empty String)
$mySQLHeadingString(empty string)

for ($i=0; $i&lt;=count($info) ; $i++){
    if($info[$i] != ""){
        $mySQLHeadingString .= $mySQLHeadings[$i] . ",";
        $infoString .= "'". $info[$i] ."',";
    }
}
</code></pre>

<p>PHP says it's an undefined offset $i in the arrays. How can I correct it or do something similar. Thank you so much.</p>
