title: Handling PHP array of unknown size
body: <p>I have the following code that should select all the users in the relevant table in my database:</p>
  
  <pre><code>$hof = mysql_query("SELECT * FROM users");
  
  $name = array();
  $website = array();
  $i=0;
  while($result = mysql_fetch_array($hof)){
  $name[$i] = $result['company']; 
  $website[$i] = $result['website'];
  }
  $i++;
  </code></pre>
  
  <p>I want to echo out the names and websites of all in the html section of my script (below the php) which will be a Hall of Frame of sorts.  How would i do is?  The fact that i do not know the size of the array deters me.  </p>
  
  <p>Usually, if i knew the size, i would so something like:</p>
  
  <pre><code>&lt;?php echo $name[1];?&gt;
  &lt;?php echo $name[2];?&gt;
  //and so on
  </code></pre>
  
  <p>Many thanks in advance.  P.S. I plan to move across to MySQLi when i have the functionality of the website sorted first on localhost.  Cheers</p>