Help with a code

So, this code prints the image name with .JPG .GIF etc…
How to exclude the .jpg in the name? Thanks for help
if((is_file($b)) && (get_file_type($b) == ‘image’)) {
if(get_file_type($b) == ‘image’) {
if($i == $file) {
$img = $b;

Use basename() to get rid of the path, then explode that on the . The first part will be the filename.

So how, can you help please

[php]pathinfo($b, PATHINFO_FILENAME);[/php]

with the code?

Sponsor our Newsletter | Privacy Policy | Terms of Service