<?php mysql_connect('192.168.0.79','root','wenyi') or die('鏈接數據庫失敗!'); mysql_select_db('wenyi') or die('選擇數據庫失敗!'); mysql_query('set names UTF-8'); $sql="select * from ecs_users limit 0,1000"; $result=mysql_query($sql); while($row = mysql_fetch_assoc($result)){ $arr[] = $row; } echo "<pre>"; print_r ($arr);//輸入數組 echo "<pre>"; exit(); ?>