2012-11-02 146 views
1

即時得到語法錯誤,在$ Q線意外$ Q ..

<?php 
$sql = "SELECT title FROM `PREFIX_GOOGLEMAPZZZ_markers`" 
$q = mysql_query($sql) 
echo "<select name=\"title\">"; 
echo "<option size =30 ></option>"; 
while ($row = mysql_fetch_array($q)) { 
echo "<option value='" . $row['title'] . "'>" . $row['title'] . "</option>"; 
} 
echo "</select>"; 
?> 

回答

1

你缺少分號在這些線路的末端。

$sql = "SELECT title FROM `PREFIX_GOOGLEMAPZZZ_markers`"; 
$q = mysql_query($sql);