In this part of the tutorial we will learn about the function pathinfo() in context of file handling. And also we will see the example related to the pathinfo() function
In this part of the tutorial we will learn about the function pathinfo() in context of file handling. And also we will see the example related to the pathinfo() function
Syntax for PHP pathinfo() Function
Array pathinfo(file_path,other options)
Code/Syntax of PHP pathinfo() Function
<?php
$ar1=pathinfo("aa.txt");
foreach($ar1
as $k=>$v)
{
echo $k."->".$v."<br/>";
}
?>
Output
dirname->.
basename->aa.txt
extension->txt
filename->aa