I'm trying the run a function that only executes if an array is empty.
If the array is empty is technically has one element with the value of ''.
The above code should tell me if the array has one or more non-empty elements and it works. However although it works, I get this message.
Warning: array_filter() [function.array-filter]: The first argument should be an array in /my server/my site /public_html/my file.php on line 40
If there a solution to this please?
If the array is empty is technically has one element with the value of ''.
Code:
if(array_filter($array))
Warning: array_filter() [function.array-filter]: The first argument should be an array in /my server/my site /public_html/my file.php on line 40
If there a solution to this please?
Comment