You can use the unset() function to remove array elements and other variables. code example Example: php unset array key unset($dataArray['key']);