Snippets tagged “basename”
2 snippets use this tag.
- Add class="active" to active page using PHPPHP
You can add the "active" class to the active page using PHP by comparing the current URL to the URL of the page you want to mark as active.
- How to remove extension from string (only real extension!)PHP
To remove the extension from a string in PHP, you can use the pathinfo() function and the basename() function.