PHP Parse error on Ubuntu but not XAMPP

Hey, first time here.

I am getting parse errors on my Digital Ocean Apache server, but not on my local XAMPP server. I checked the PHP versions, and they are both PHP 7. The error states, “Parse error: syntax error, unexpected '”', expecting ‘-’ or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /var/www/[mywebsite]/index.php on line 44". I get no errors whatsoever on my local server, even thought the code is the exact same! I checked the other pages on the site, and the ones without PHP code work flawlessly (just a PHP issue). I am at a loss. Any help is appreciated. Thank you!


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello, @ryanmichaelcurry

Can you paste the content of the index.php file so we can check it for you? You can review the code and make sure that you have ; at the end of each statement as well.

Regards, Alex