PHP get File Name

<?php

// your file
$file = 'image.jpg';

$info = pathinfo($file);
$file_name =  basename($file,'.'.$info['extension']);

echo $file_name; // outputs 'image'

http://www.php.net/manual/en/function.basename.php