Omit PHP end tag – "header already send" Error

If a page contains only PHP code, best practice is to omit the PHP end tag ( ?> ). PHP does not require the end tag on PHP only pages.

Including the end tag can cause unwanted injection of trailing white spaces which can cause header already sent errors.

Leave a comment

Your email address will not be published. Required fields are marked *