0

Basically I am trying to check if a variable is equal to 5, and then echo something if it is, but I get this error.

PHP Code

if ($adminlevel) === '5' {
    echo 'user is owner';
}

Error

Parse error: syntax error, unexpected '===' (T_IS_IDENTICAL) in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\projects\Portfolio -- Website\forum\index.php on line 12
John Conde
  • 217,595
  • 99
  • 455
  • 496

1 Answers1

0
if ($adminlevel === '5') {
    echo 'user is owner';
}

Move the paren to include the entire statement.

TonalLynx
  • 376
  • 2
  • 13