Answers for "array trim"

PHP
5

php trim all array elements

$result = array_map('trim', $source_array);
Posted by: Guest on May-31-2020
0

trim elements of array php

$arr = array( " John ", "Jacob ", " Tom ", " Tim ");
$result = array_map('trim', $arr)
Posted by: Guest on June-13-2020
0

array cut only last 5 element

arr.slice(Math.max(arr.length - 5, 0))
Posted by: Guest on May-23-2020

Browse Popular Code Answers by Language