I have a tiny script that I use to call the name of the image displayed on the page;

PHP Code:
<?php 
    
if ($_GET['image']) {
    echo 
"<div style='margin:0px; padding:2px; text-align: right;'>".$_GET['image']."</div>" ;
    }
    if (
$_GET['image']) {
    echo 
'<img src="'.$_GET['image'].' " alt="'.$_GET['image'].' ">';
    } 
    
?>
and so it displays the full image name, how do i do it so that it gets rid of the .jpg at the end of each??

any help would be much appreciated, thanks for your time!

Tjobbe