KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following code <?php $error = array(); $error['something'] = false; $error['somethingelse'] = false; if (!empty($error)) { echo 'Error'; } else { echo 'No errors'; } ?> However, empty($error) still returns true , even though nothing is set. What's not right?
Tags (comma-separated)
Save Edits
Cancel