title: How to loop through an array and print each item into an <li> tag using PHP?
body: <p>I'm trying to iterate through the array using php. I want the items to be stored in an <code>&lt;li&gt;</code> tag. I'm having trouble getting the names to print out. I can get a count of the array items printed, however not the names. </p>
  
  <pre><code>    &lt;ul&gt;
      &lt;?php 
          $names = array('Mike', 'Chris', 'Jane', 'Bob');
          for($i=0; $i &lt; count($names); $i++) {
              echo "&lt;li&gt;" . $i . "&lt;/li&gt;";
          }
      ?&gt;
  &lt;/ul&gt;
  </code></pre>