Check if a variable is set before trying to unset. Otherwise, this will blow up with $a[b][c] if $a[b] doesn't exist.
Check if a variable is set before trying to unset. Otherwise, this will blow up with $a[b][c] if $a[b] doesn't exist.