Why should you learn PHP when there are two many “better” languages available? It’s easy to learn. You can build practical web apps within a week of starting. Finally a huge number of legacy web apps such as WordPress, Drupal, and many of the open source projects that you download were coded in PHP. To be a professional you’ll need to have 5 or more languages under your belt, and although PHP may not be the one you end up preferring to use, it’s a good one to be comfortable with.
The pathinfo() function allows you to turn a filepath into an Array and then interact with the keys of the Array. You can grab the Filename, Extension, Folder Name and Basename. pathinfo() https://www.php.net/manual/en/function.pathinfo.php https://www.w3schools.com/php/func_filesystem_pathinfo.asp pathinfo.php
Cookies allow you to set variables that are persistent between multiple visits to a website.