Whether we like it or not, once we write code we will make mistakes and errors. Therefore it is imperative we will catch and fix problems in our applications. For that php has several tools for debugging. I will talk about the basics of code debuging.
But before we start debugging we need to set the stage the right way. First we let php know that we want to display errors:
This code should be placed at the top of our code: