0

I am currently getting the following error:

Parse error: syntax error, unexpected '[' in file.php on line 111 when I run my file.php.

Below is the code that is being affected.

<?php
  if(user_logged_in() || validate_user()[user_role] == 'administrator') {
?>
<body>
    <div class="chart" id="OrgChart"></div>
</body>
<?php
  } else {
      echo '<p>Error: You need to be an Admin</p>';
  }
?>

Can anyone tell me what to do?

Qirel
  • 25,449
  • 7
  • 45
  • 62
ApplePie
  • 1,155
  • 3
  • 12
  • 30

0 Answers0