PHP ???? ?? ??? ?? ??
php ??? ??
? ??? ?? ?? ??? ? ?? ??, ?? ??? ?? ??? ? ?? ????. ?? ???? 2?? ?? 3?? ??? ?? ? ????.
2?? ?? ???
??:
?? (
??(1,2,3,4,5),
??(6,7,8,9,10)
)
? 1:
<?php $arr = array( array(1,2,3,4,5), array(6,7,8,9,10) ); echo "<pre>"; print_r($arr); echo "</pre>"; ?>
? 2: ??? ?? ???
<?php header("Content-type: text/html; charset=utf-8");//設置編碼 $sites = array ( "php"=>array ( "php中文網(wǎng)", "http://ipnx.cn" ), "google"=>array ( "Google 搜索", "http://www.google.com" ), "taobao"=>array( "淘寶", "http://www.taobao.com" ) ); print("<pre>"); // 格式化輸出數(shù)組 print_r($sites); print("</pre>"); ?>
??? ??? ?? ??? ??? ???? ?????.
??? ???? ?? ??? ? ??? ??? ? ?? ??, ?? ??? ? ??? ??? ? ?? ????.