When posting PHP code, please use the board's [noparse]
..
[/noparse] bbcode tags as they make your code much easier to read and analyze.
Now that I've added your tags, the color coding (something your IDE/editor should already be doing! 😉) basically points out where the error is:
echo "<p>$FirstMessage</p>
this line is missing a closing string delimiter as well as a semicolon.