Find the extension of filename in php - PHP Views : 255
Tagged in : PHP
0 0
Send mail
we can use the function pathinfo to find or get the extension of the filename.

// First use the function pathinfo. send the filename as argument to pathinfo.
$info = pathinfo($file);

// the resulting array has the extension. we can fetch it as shown below.
$file_name = $info['extension'];

By rajesh, On - 2010-01-03



    Login to add Comments .