1 2 3 4
<?php $str = '---this-is-my-page---'; var_dump( trim($str, '-') ); //string(15) "this-is-my-page" ?>
1
string(15) "this-is-my-page"