Tuesday, January 25, 2011

Parse error: syntax error, unexpected $end


Most of the time it happens that you get some parse PHP error and didn’t get resolved even in hours. Here is what it took me long to debug a simple error (even very simple you can call).

Parse error: syntax error, unexpected $end in C:\wamp\www\blog\wp-content\themes\Classico\loop-home-full.php on line 55

Solution

Due to new version of PHP certain things came into light. Earlier it used to be
<?           (inside loops) for frequent use of HTML code.
This starting PHP tag is no longer supported by web servers. But if you replace this tag with full PHP syntax like :
 <?php
your problem will be solved.