 <p>I don't suggest using numerical indexes if you don't have to, as in this case, they can be unpredictable. Instead, use the column names from your database, like this...</p> <pre><code>$videoFile = $row['videoFile']; $views = $row['views']; </code></pre> <p>Also, you say you want the ONE entry with MOST views, so I believe you want...</p> <pre><code> $q="select videoFile, views from videos ORDER BY views DESC LIMIT 1"; </code></pre>