Php-How to make slug in php

## make slug using this function.


Like: stackofcodes.in/2016/01/10/how-to-search-data-from-table-in-php/

function makeslug($str) {
    return preg_replace("/[^0-9a-zA-Z]+/", "-", $str);
}

$tog = how_can i make slug.

$slug = function makeslug($tog);

Example:
Its Look Like: how-can-i-make-slug

 

Leave a Reply

Your email address will not be published. Required fields are marked *