How do I, using preg_replace, replace more than one underscore with just one underscore?
preg_replace('/[_]+/', '_', $your_string);