try:
OCIFetchInto($stmt, &$result);
echo "$result[0]";
OCIFetchInto($stmt, &$result);
echo "$result[0]";
OCIFetchInto($stmt, &$result);
echo "$result[0]";
OCIFetchInto($stmt, &$result);
echo "$result[0]";
我的最终目的是在表单中的下拉列表框中显示出来。
<p>新闻类别:
<select name="select">
<?
while(OCIFetchInto($stmt, &$result) ) {
echo "<option value=$result_array[0]></option>";
}
?>
</select>
但这样不行,请再告诉我如何解决。谢谢你。
<select name="select">
<?
while(OCIFetchInto($stmt, &$result)&&$result[0]!='') {
echo "<option value=".'$result[0]."'>".$result[0]."</option>";
}
?>
</select>
问题解决了,你的代码有一点点小问题,我把value=后的双引号和echo中的第一个result[0]后的双引号去掉就好用了。