I know it's possible in PHP to check if the item is in the array this way:
if( my_array['item_one'] ){ # some code here... }
That's because if the item isn't, then null
value (that equals to false
or zero
) is returned instead.
But will it always work? Will it always be safe to do it this way (because you know... PHP)?