ereg_replace in Wordpress

Posted on 16th Feb 2014 by admin

Heya - so I'm working on this site: http://world-of-smiles.theportlandco.com/new-patients

The site is built off Wordpress and I'm getting the pages title using Wordpress function: Line number On/Off | Expand/Contractwp_title("", false, "") and I'm trying to reformat it's title to all lowercase and replace spaces with dashes. It's working, except that it's adding two dashes to the beginning of the title and I'm not sure why. Can someone help?
Line number On/Off | Expand/Contract<?php echo ereg_replace(" ", "-", strtolower(wp_title("", false, ""))); ?

Other forums