Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php array_filter

$array = [1, 2, 3, 4, 5];

$filtered = array_filter($array, function($item) {
    return $item != 4; // Return (include) current item if expression is truthy
});

// $filtered = [1, 2, 3, 5]
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php
ADD COMMENT
Topic
Name
9+9 =