Author: ApPHP Language: php
Description: SEO Friendly Links in PHP Timestamp: 2017-10-03 19:48:51 +0000
View raw paste Reply
  1. <?php          
  2. function makeMyUrlFriendly($url){
  3.     $output = preg_replace("/\s+/" , "_" , trim($url));
  4.     $output = preg_replace("/\W+/" , "" , $output);
  5.     $output = preg_replace("/_/" , "-" , $output);
  6.     return strtolower($output);
  7. }
  8. ?>
View raw paste Reply