will replace all instances of any character that is a letter or number with the dash. It's supposed to create user friendly post slugs from title string to use within URLs.
Thanks,
Victor
Linux NetworkingPHPRegular Expressions
Last Comment
Victor Kimura
8/22/2022 - Mon
Vimal DM
Hai,
Just a slight modification there in your function
function create_slug($string){
$slug=preg_replace('/[^A-Za-z]+/', '-', $string);
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
Just a slight modification there in your function
function create_slug($string){
$slug=preg_replace('/[^A-Z
return $slug;
}