PHP Conference Fukuoka 2025

Voting

: one plus one?
(Example: nine)

The Note You're Voting On

kaysar in ymail in com
16 years ago
Drop extensions of a file (even from a file location string)

<?php

$filename
= "c:/some dir/abc defg. hi.jklmn";

echo
substr($filename, 0, (strlen ($filename)) - (strlen (strrchr($filename,'.'))));

?>

output: c:/some dir/abc defg. hi

Hope it may help somebody like me.. (^_^)

<< Back to user notes page

To Top