The basename() function returns the filename from component of path.
Syntax
basename(filepath,suffix)
Example
echo basename("/content/people.txt");
echo basename("/content/people.txt",".txt");
Output
people.txt
people
Copyright ©2022 coderraj.com. All Rights Reserved.