update page now

Voting

: eight plus zero?
(Example: nine)

The Note You're Voting On

swedish boy
16 years ago
Here is a quick way of fetching only the filename (without extension) regardless of what suffix the file has.

<?php

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

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

echo $file_name; // outputs 'image'

?>

<< Back to user notes page

To Top