我有這段代碼來動態地在drupal中創建一個選擇列表。選擇列表允許值
$res = db_query("select field1 from content_type_1");
while($row = db_fetch_array($res)){
$rows[] =$row['field1'];
}
return $rows;
輸出是這樣的:
<select>
<option value="0">row['field1']</option>
</select>
我需要這樣的
<select>
<option value="row['field1']">row['field1']</option>
</select>
輸出如何做到這一點?
謝謝帕斯卡爾馬丁。它也適用於drupal。 – user677900 2011-03-27 09:34:55
偉大的:-)很高興我能幫上忙。玩的開心 ! – 2011-03-27 09:37:52