Im generating xml with php, eveything works fine except the first result is blank..
Any ideas?
<?php
header("Content-type: text/xml");
$connection = mysql_connect("localhost","xxxxx", "xxxxx")
or die ("could not connect to database");
$db = mysql_select_db("xxxxx",$connection)
or die ("Couldn't select database.");
$rs = mysql_query("SELECT * FROM video WHERE type = 'public' " .$active. "AND viewtime <> '0000-00-00 00:00:00' ORDER BY viewtime DESC LIMIT 0,10",$connection)
or die ("invalid query");
echo ("<ut_response status=\"ok\">");
echo ("<video_list>");
do {
echo ("<video>");
echo ("<title>". $row['title']. "</title>");
echo ("<url>http://www.tsxxx.com/video/". $row['VID']. "</url>");
echo ("<thumbnail_url>http://www.tsxxx.com/thumb/". $row['thumb']."_". $row['VID'].".jpg</thumbnail_url>");
echo ("</video>");
} while ($row = mysql_fetch_assoc($rs));
echo ("</video_list>");
echo ("</ut_response>");
?>