📜  php 将数组设为一定长度 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:56.532000             🧑  作者: Mango

代码示例1
#trim array to certain legnth
$alphabet = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];
$alphabetFirst10 = array_slice($alphabet, 0, 10);