首頁  >  文章  >  後端開發  >  PHP中數組定義的幾種方法_PHP教程

PHP中數組定義的幾種方法_PHP教程

WBOY
WBOY原創
2016-07-21 16:12:22789瀏覽

複製程式碼 程式碼如下:

$a = array("中國人","亞亞州人","龍王爺","西藏自治區");

$b[0] = "蘋果";
$b[1] = "蘋果";
$b[2] = "蘋果";
$b[3] = "蘋果";
$b[4] = "蘋果";

$c = array("one" => "中國人","tow" =>"亞州人","three" => "龍王爺","four" => "西藏自治區");

var_dump($a);

echo "
";

var_dump($b);

echo "
";

var_dump($c);
?>

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/313660.htmlTechArticle複製程式碼如下: ?php $a = array("中國人","亞州人","龍王爺","西藏自治區"); $b[0] = "蘋果"; $b[1] = "蘋果"; $b[2] = "蘋果"; $b[3] = "蘋果"; $b[4] = "蘋...
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn