$query4="SELECT calldate FROM cdr WHERE dst = '801' OR dst = '802' ORDER BY calldate DESC"; while($row = mysql_fetch_array($query4, MYSQL_ASSOC)); { echo "The Box Office was opened at {$query4['calldate']}"; } The output I am getting is The Box Office was opened at S