Google strongly guide webmasters to make there website URLs SEO friendly or Google friendly. Creating URL from title is the best way to make URLs more user or search engine friendly. This simple function can make clean and friendly URL slug from ugly to uglier title or string.
The URL Slug Function:
Usage:
Output:
The URL Slug Function:
/** * URL Slug * @param str $str * @return str */ function url_slug($str) { #convert case to lower $str = strtolower($str); #remove special characters $str = preg_replace('/[^a-zA-Z0-9]/i',' ', $str); #remove white space characters from both side $str = trim($str); #remove double or more space repeats between words chunk $str = preg_replace('/\s+/', ' ', $str); #fill spaces with hyphens $str = preg_replace('/\s+/', '-', $str); return $str; }
Usage:
$title = ' This -iS- (my) @$ugly@# tiTle !!!!!!!!!!!!!!!!!!!! '; echo url_slug($title);
Output:
this-is-my-ugly-title
Jacket Leather Indonesia
ReplyDeleteCivet Coffee Real Indonesia
cd interaktif
bantal silikon
pembicara marketing
anne
jelita
brenda
anne
caca
tasya
ruth
distrobantal.blogspot.com/
bantalsilikon01.blogspot.com/
sabunherbalya.blogspot.com/
kesethandukmalang.blogspot.com/
bantalmalangmurah.blogspot.com/
restoran-seo.blogspot.com/
distro-seo.blogspot.com/
jualsangkarpleci.blogspot.com/
marinir-seo.blogspot.com/
bumbu-pecel-malang.blogspot.com/
CD,marinir,bantal-silikon15.blogspot.com,bumbu-,seo-guru01,seo,seo,http://dfes12/,agen,seo/,seo16,age,jk,jk,seo,guru,seo,seo,vvt,agen,asdf,banta,laris,bantal,999,
dịch vụ báo cáo thuế tại tỉnh bình dương
ReplyDeletedịch vụ báo cáo thuế tại quận bình thạnh
dịch vụ báo cáo thuế tại quận tân phú
dịch vụ báo cáo thuế tại quận 5
dịch vụ báo cáo thuế tại quận 3
dịch vụ báo cáo thuế tại tphcm
dịch vụ báo cáo thuế tại quận long biên
dịch vụ báo cáo thuế tại quận hà đông
dịch vụ báo cáo thuế tại quận thanh xuân
dịch vụ báo cáo thuế tại quận cầu giấy
dịch vụ báo cáo thuế tại gia lâm
dịch vụ báo cáo thuế tại đông anh
dịch vụ báo cáo thuế tại thanh trì
dịch vụ báo cáo thuế tại quận hoàng mai
dịch vụ báo cáo thuế tại quận hai bà trưng
dịch vụ báo cáo thuế tại quận từ liêm
dịch vụ báo cáo thuế tại quận hoàn kiếm
dịch vụ báo cáo thuế tại quận tây hồ
dịch vụ báo cáo thuế tại quận ba đình
dịch vụ báo cáo thuế tại quận đống đa
I have read your blog its very attractive and impressive. I like it your blog.
ReplyDeletePHP Training in chennai | PHP Training Course
PHP Training in chennai | Online PHP Course
Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support about this area. php training in chennai
ReplyDeleteIt is a very nice article including a lot of viral content. I am going to share it on social media. Get the Cold Pressed Oil in online.
ReplyDeleteExcellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
ReplyDeleteBest web Designing Training Training Institute in Kanchipuram
What’s up, I’m Jackson. I’m a writer living in New York, NY. I am a fan of reading, photography, and programming. I’m also interested in writing and travel. FMovies Proxy, technology, programming, and gaming. I’m also interested in Mrgreentechblog. You can read my ModsApkWap sweet goodnight messages blog with a click on the button above.
ReplyDeleteThis was nice and amazing and the given contents were very useful and the precision has given here is good.
ReplyDeleteOnline Training for Big Data
best Apache Spark online course