Couldn't find anything about this when searching and couldn't find any solution on my own and I would rather not use rename().
I want to simplify my work by naming my files based on my <title>
I'd make a
$fileName = "This is my file name";
<title><?php echo $fileName = str_replace(' ', '-', strtolower($fileName )) ?></title>
Or simply
<title><?php strtolower("This is my file name") ?></title>
Output: this-is-my-file-name.html/php
Is there such a solution that can be set with a few lines of code, just as rename() but it targets itself and no other files?