Last Updated: February 25, 2016
·
1.428K
· rican7

PHP Array Empty?

This is good to know.

Essentially, an array with a single, null value isn't "empty"

However, an array with no keys/values is considered both "empty" and null (loosely).

1 Response
Add your response

@mbarzda exactly. Simple to understand, but I can understand how it would trip someone up if they haven't run into it before.

over 1 year ago ·