unset key array php code example Example 1: php unset array key unset($dataArray['key']); Example 2: unset by key name php unset($array['key-here']);