George Reith George Reith - 2 months ago 19
PHP Question

PHP: remove filename from path

Say I have an path: images/alphabet/abc/23345.jpg

How do I remove the file at the end from the path? So I end up with: images/aphabet/abc/

Answer

You want dirname()