-2

I use PHP 8 and wrote this code from a channel in YouTube, the code works fine in the channel but in my machine is not, also it's weird and I didn't know from where to start to solve it.

the error as shown in the screenshot is: ';' expected.

but the " ; " is already written! So what is the problem?

enter image description here

alimohysf
  • 9
  • 3
  • 5
    Don’t post pictures of code, they’re not accessible nor searchable – Clive Jun 02 '22 at 11:50
  • I suggest you split it into an if statement and the $path into a variable first, instad of condencing everything into a one-liner. This often is better for the exact problem you're having now – Martijn Jun 02 '22 at 11:54
  • It says `Ln 3, Col 68` but the columns should only be about 32. This means there's some invisible characters there. Delete the line and retype it. – aynber Jun 02 '22 at 11:54
  • [FAQ: Why should I not upload images of code/data/errors when asking a question?](https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors-when-asking-a-question) – IMSoP Jun 02 '22 at 11:55

0 Answers0