title: PHP how can I get column value by name from a row?
body: <p>I'm a bit stuck on this one. In my PHP code, I query for some records which are returned. I loop through the rows, but for each row I want to retrieve a column value using its name as an index. </p>
  
  <pre><code>while ($row=mysql_fetch_row($result))
  {
      echo $row[7];
  }
  </code></pre>
  
  <p>This prints out what I want, but I wanted to do something like:</p>
  
  <pre><code>echo $row["description"];
  </code></pre>
  
  <p>Where description is the name of the column whose value I want to print? Can this be done?</p>
  
  <p>Thank you very much.</p>