SyntaxFix
Write A Post
Hire A Developer
Questions
Instead of parsing it manually it's better to use pathinfo function:
$path_parts = pathinfo($value); $extension = strtolower($path_parts['extension']); $fileName = $path_parts['filename'];