Answers for "php trim array to certain length"

PHP
2

php trim array to certain length

#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);
Posted by: Guest on September-04-2021

Browse Popular Code Answers by Language