當前位置:成語大全網 - 書法字典 - 如何在php中創建新數組?

如何在php中創建新數組?

php中創建新數據有兩種方式,壹種是通過數組函數,另壹種是通過賦值[]。

& lt?服務器端編程語言(Professional Hypertext Preprocessor的縮寫)

$arr1?=?數組(1,2,3,4);

var _ dump($ arr 1);

$arr2[0]?=?1;

$arr2[1]?=?2;

$arr2[2]?=?3;

$arr2[3]?=?4;

var _ dump($ arr 2);