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

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

WBOY
發布: 2016-07-21 16:12:22
原創
819 人瀏覽過

複製程式碼 程式碼如下:

$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] = "蘋...
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板