title: PHP array not showing
body: <p>I have this JS inside my php code:</p>
  
  <pre><code>echo " for (var i = 0; i&lt;length; i++){
           alert('array[i]');
  
  }";
  </code></pre>
  
  <p>Assuming all variables were defined and initialized, i'm not getting any output from the alert.</p>
  
  <p>However, if i replace <code>array[i]</code> with <code>array[2]</code>, I get that value alerted.</p>
  
  <p>any advice? </p>