Chris Spectre
New member
Trying to install a php script but i'm getting the following error on all pages:
Parse error: syntax error, unexpected T_PUBLIC, expecting ']' in /home/public_html/showcase/inc/function.php on line 535
From experience i realise this is a simple problem to solve, but can't for the life of me remember what it is! I know the error can be found slightly before line 535 and have included the details here, can anyone spot the error?
529 function GetPlatform() {
530 global $HTTP_USER_AGENT;
531
532 if (strstr($HTTP_USER_AGENT,'Win')) {
533 $BROWSER_PLATFORM='Win';
534 } else if (strstr($HTTP_USER_AGENT,'Mac')) {
535 $BROWSER_PLATFORM='Mac';
536 } else if (strstr($HTTP_USER_AGENT,'Linux')) {
537 $BROWSER_PLATFORM='Linux';
538 } else if (strstr($HTTP_USER_AGENT,'Unix')) {
539 $BROWSER_PLATFORM='Unix';
540 } else {
541 $BROWSER_PLATFORM='Other';
542 }
543 return $BROWSER_PLATFORM;
544 }
Parse error: syntax error, unexpected T_PUBLIC, expecting ']' in /home/public_html/showcase/inc/function.php on line 535
From experience i realise this is a simple problem to solve, but can't for the life of me remember what it is! I know the error can be found slightly before line 535 and have included the details here, can anyone spot the error?
529 function GetPlatform() {
530 global $HTTP_USER_AGENT;
531
532 if (strstr($HTTP_USER_AGENT,'Win')) {
533 $BROWSER_PLATFORM='Win';
534 } else if (strstr($HTTP_USER_AGENT,'Mac')) {
535 $BROWSER_PLATFORM='Mac';
536 } else if (strstr($HTTP_USER_AGENT,'Linux')) {
537 $BROWSER_PLATFORM='Linux';
538 } else if (strstr($HTTP_USER_AGENT,'Unix')) {
539 $BROWSER_PLATFORM='Unix';
540 } else {
541 $BROWSER_PLATFORM='Other';
542 }
543 return $BROWSER_PLATFORM;
544 }