I am pulling categories from a news database, some of which are in the form, "BusinessNews", SportsNews", etc.
I am writing a script that will loop through and create a select box with these values. What I want to do is to be able to display the categories in a user-friendly way, i.e.,
<option value="BusinessNews">Business News</option>
So, I need a regular expression that will parse the variable (say $category[$i]) and look for a lowercase letter together with an UPPERCASE letter and add a space between the two.
I guess I would do this with an ereg_replace? And if so, does anyone know what regular expression I would use to accomplish this?