我希望在我的回声中消除%20

In my .php file I use the following to return the category that my posts are in:

<?php echo single_cat_title(); ?>

The category title is then returned in my URL. HOWEVER, since my category is two words ("South Africa"), the URL reads: "south%20africa" instead of "southafrica".

I know that the "%20" is being inserted because urls cannot have breaks. Is there a way to edit the above <?php echo single_cat_title(); ?> to return the category title but eliminate any breaks?

echo urldecode("south%20africa");

or

echo str_replace('%20', '', "south%20africa");