Hi all,
How would I go about removing the file extension of a variables contents?
$variable = "imageone.jpg";
?
Thanks in advance
p.s. this is so I can echo the name of the image to screen without the extension.
[man]pathinfo/man and [man]basename/man may come in handy here, e.g.
$filename = "directory/imageone.jpg"; $filename_parts = pathinfo($filename); echo basename($filename_parts['basename'], '.' . $filename_parts['extension']);