[請益] 畫table的寬度設定

看板PHP作者時間19年前 (2006/03/22 04:16), 編輯推噓2(200)
留言2則, 2人參與, 最新討論串1/1
想請問一下關於設欄位寬度的問題 ,小弟的程式如下 <html> <head><title> Example </title></head> <body> <? $link_ID=mysql_connect ("localhost"); mysql_select_db("database_name"); $str="select * from user_info;"; $result=mysql_query($str,$link_ID); $row_n=mysql_num_rows($result); $fil_n=mysql_num_fields($result); $result=mysql_fetch_field ($result); $result=mysql_list_fields("database_name","table_name",$link_ID); echo "<TABLE ALIGN=center Border=1>"; for($index=0;$index < $fil_n;$index++) { $temp=mysql_field_name($result,$index); $temp2=mysql_field_len($result,$index); echo "<TD WIDCH=$temp2> $temp</TD>"; ^^^^^^^^^ 這邊欄位的寬度並不會依照抓出來的大小 設定說,可以請問一下有什麼方法嗎? 感謝 ~ } echo "</TR>"; $row_num = mysql_num_rows($result); ?> </body> -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.170.134.64

03/22 16:07, , 1F
width
03/22 16:07, 1F

03/23 07:56, , 2F
真是搞笑 lol 不過改了以後仍然沒變說 ...@@
03/23 07:56, 2F
文章代碼(AID): #1485ytGT (PHP)
文章代碼(AID): #1485ytGT (PHP)