PHP Missing Bracket syntax error, unexpected ‘}’


Parse error: syntax error, unexpected '}', expecting ']'

One of the great features with PHP error checking is the error explanation. When an error does occur, the explanation often leads you straight to the solution. The next example shows an error where '}'was used instead of ']'. The example also explains how to fix the issue.

Error:
Parse error: syntax error, unexpected '}', expecting ']' in /home/user/public_html/file.php on line 12

 // Change $_GET['id'}  // Change to: $_GET['id']