PhotoDateChanger
Easily change the dates and times on your photos and videos
Click here for more info about the app
VocabReminder
English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
VocabQuiz
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app

How to Slugify a String in PHP

       

Here is a snippet for generating a URL friendly slug in PHP

function slugify($string){
        return strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', $string), '-'));
    }

And you can use it in your code like so

<?php echo slugify('!hello world!? how are you???'); // => hello-world-how-are-you ?>
Tagged w/ #php #snippets #slugs #friendly urls