title: Using mysql_query and mysql_fetch_array
body: <p>I am trying to find out which is the proper way to fetch data from my database. Either way works, but what's the difference; an in-depth explanation?</p>
  
  <pre><code>$sql = mysql_query("SELECT * FROM _$setprofile");
  while($row = mysql_fetch_array($sql)) {
      $username = $row['user'];
      $password = $row['pass'];
      echo "$username:$password";
  }
  </code></pre>
  
  <p><strong>versus</strong> the function below...</p>
  
  <pre><code>$sql = mysql_query("SELECT user,pass FROM _$setprofile");
  while($row = mysql_fetch_row($sql)) {
      echo "$row[0]:$row[1]";
  }
  </code></pre>
  
  <p>This is something I've always wanted to know.</p>