PHP ??? ??
? ??? ?? ?? ??? ? ?? ??, ?? ??? ?? ??? ? ?? ????. ?? ???? 2?? ?? 3?? ??? ??? ? ????:
Instance
<?php // 二維數(shù)組: $cars = array ( array("Volvo",100,96), array("BMW",60,59), array("Toyota",110,100) ); ?>
Run Instance?
PHP - ??? ??
??? ??? ?? ??? ??? ???? ?????.
??? ???? ?? ??? ? ??? ??? ? ?? ?? ?? ??? ? ??? ??? ? ?? ????.
?
? ???? ID ?? ???? ??? ??? ??? ????.
?
<?php $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>"); ?>
? ??? ??? ?? ?????. :
??
(
[php] => ??
http://ipnx.cn
)
[google] => ??
(
) [0] => Google ??
[1] => http://www.google.com
)
] => ??
(
) [0] => ????
[1] => http://www.taobao.com
)
)
?? 2
? ??? ?? ??? ?????.
echo $sites[ 'php'][0] . '??:' . $sites['php'][1];
? ??? ??? ?????:
PHP ??? ???? ??:
? 3
????