title: How to echo foreach array with variables on the same table row?
body: <p>How do I echo an array with the first name and last name on the same table row and city and state on the same table row?</p>
  
  <pre><code>while(!empty($userphoto))
  {       
  //output images     
  foreach(array($userphoto, $firstName, $lastName, $age, $email, $city, $state) as  $items)
  {
      echo "&lt;tr&gt;";
  
      foreach($items as $key=&gt;$item)
      {
          echo "&lt;td&gt;&lt;font size =\"2\" &gt;$item&lt;/td&gt;";
  
          //output only four of them
          if($key==4)
          {
              break;
          }
      }
      echo "&lt;/tr&gt;";
  </code></pre>