php - Slug function isnt working -


function createslug($slug){      $lettersnumbersspaceshyphens = '/[^\-\s\pn\pl]+/u';      $slug = preg_replace($lettersnumbersspaceshyphens,'',mb_strtolower($slug, 'utf-8'));     $slug = preg_replace($spacesduplicatehyphens,'-',$slug);     $slug = trim($slug, '-');      return $slug; }  $slug       = createslug($_post['label']); 

when remove function createslug $_post['label'], slug being added database string is. i'm getting no return value.

insert line error_reporting(e_all );, before call createslug(). , after can see several problems code.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -