The problem in your Food Chain simulation is probably minor. The error you’re getting is definitely from the PHP — it’s one that usually happens when there’s some kind of syntax error derailing the parser, like a missing quote, semicolon, or curly bracket. The code seems to be there, though, because the error message says it gets all the way to line 1261 (probably the last line, by which point the parser realizes it isn’t going to get that missing character it wants).
One thing you might want to consider, if you do go ahead with your new project, is building a simpler prototype first. For example, you could write a simple version in Excel with all the calculations but just one other computer opponent and all the information for your simulation pre-loaded on hidden worksheets. Otherwise, if you build a whole web application, you will be forced to solve several different problems at once.