$arr = array();
$obj["a"] = 1;
$obj["b"] = 2;
array_push($arr, $obj);
$obj["a"] = 9;
$obj["b"] = 0;
array_push($arr, $obj);
for( $i=0; $i<count($arr); $i++ ){
echo "<br />arr[".$i."] a : " . $arr[$i]["a"];
echo "<br />arr[".$i."] a : " . $arr[$i]["b"];
}
-------------------------------------------------------------------------
$sql = "select seq,title,content,file_ori,hit,regdate,file_phy from php_test order by seq desc limit 10";
$rs = mysql_query($sql, $connect);
$list = array();
while( $row = mysql_fetch_object( $rs ) ){
$map;
foreach( $row as $key => $data ){
$map[$key] = $row[$key];
}
array_push($list, $map);
}
for( $i=0; $i<count($list); $i++ ){
echo ( "" );
echo ( " ". $list[$i][seq] . "" );
echo ( " ". $list[$i][title] . "" );
echo ( " ". substr($list[$i][regdate], 0, 10) . "" );
echo ( " ". $list[$i][hit] . "" );
echo ( "" );
}