Answers for "remove all items of an array except the last 5 in php"

PHP
0

remove all items of an array except the last 5 in php

$a5 = array_slice($arr, -5);
Posted by: Guest on August-16-2021

Code answers related to "remove all items of an array except the last 5 in php"

Browse Popular Code Answers by Language