Look at the error message: "Unexpected 'echo'".
That means that PHP was not expecting there to be an "echo" statement there, which tells us that something prior to that "echo" statement is causing the echo statement to be out of place.
In pretty much any language, when you get syntax errors, you want to look at the code above the line specified in the error message.
Comment