Answers for "keep only n elements of array php"

PHP
0

keep only n elements of array php

return array_slice($array, 0, $n); // Keep only n first elements of the array and
// returns them
Posted by: Guest on September-27-2021

Code answers related to "keep only n elements of array php"

Browse Popular Code Answers by Language