Posted By

hasantayyar on 08/18/09


Tagged

php


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

umang_nine


replace strings for URL


 / Published in: PHP
 

  1. function create_slug($string){
  2. $slug=preg_replace('/[^A-Za-z0-9-]+/', '-', $string);
  3. return $slug;
  4. }

Report this snippet  

You need to login to post a comment.