basename() function | Get file & folder name from path in PHP

basename() is an inbuilt function in PHP. It is used to get the name of the file from a path. You can pass the path in its argument as a string and then it will return the name of the file with the extension. Basically, the basename() function splits path and return last data from … Read more