What common mistake led to the error in the provided code snippet?

The common mistake in the provided code snippet is that the closing PHP tag "?>" is followed by whitespace or new lines after it. This can cause unintended output or errors, especially when the PHP script is included in other files or when sending headers. To solve this issue, simply remove any whitespace or new lines after the closing PHP tag to ensure that no output is sent before headers are set.

<?php
// Your PHP code here
?>