pathinfo() returns an associative array
containing information about path
.
Parameters
path
The path being checked.
options
You can specify which elements are returned with optional parameter
options
. It composes from
PATHINFO_DIRNAME,
PATHINFO_BASENAME,
PATHINFO_EXTENSION and
PATHINFO_FILENAME. It
defaults to return all elements.
Return Values
The following associative array elements are returned:
dirname, basename,
extension (if any), and filename.
If options
is used, this function will return a
string if not all elements are requested.