Home >Backend Development >PHP Tutorial >PHP array deletion empty array program_PHP tutorial
There are many array methods for deleting empty elements. Today I will introduce two classic methods. One uses the array_filter function, and the other also uses the function to call a custom function.
The code is as follows
|
Copy code
|
||||
$str1_array=array('Yiju Tutorial Network','','http://www.bKjia.c0m','','1654','');
$str1_array=array_filter($str1_array);
?>
|
(
)