I have two types of strings, 'hello', 'helloThere'.
What I want is to change them so they read like: 'Hello', 'Hello There'
depending on the case.
What would be a good way fo doing this?
Thanks
I have two types of strings, 'hello', 'helloThere'.
What I want is to change them so they read like: 'Hello', 'Hello There'
depending on the case.
What would be a good way fo doing this?
Thanks
you can use ucwords
like everyone said... to add the space in helloThere
you can do $with_space = preg_replace('/[A-Z]/'," $0",$string);
then ucwords($with_space);