parusa619 - $var and $val are variables set by the list function (list()
john010117 - I'm not sure you need this line:
while(list($var, $val) = each($row)) {
Your outer while loop is already looping through the rows in the resultset, this would loop through the fields in the current row.
Also, make sure you validate ALL input coming from outside PHP. Especially, don't use $GET and $POST values directly in an sql query like this:
$result = mysql_query("SELECT * FROM news WHERE Date = '{$_GET['date']}'");
Google for PHP input validation for some reading material.