Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how remove empty value in array php

<?php
$array = array("apple", "", 0, 2, null, -5, "0", "orange", 10, false);
var_dump($array);
echo "<br>";
 
// Filtering the array
$result = array_filter($array);                 
var_dump($result);
?>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #empty #array #php
ADD COMMENT
Topic
Name
4+5 =