Re: SeparatingWords
| From: | Philip Hallstrom | Date: | Wed, 21 Aug 2002 21:52:09 +0000 |
| Subject: | Re: SeparatingWords | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-113536@lists.php.net to get a copy of this message | ||
This works.
$word = "SoftwareVersionThingy";
$word = ereg_replace("([A-Z])", " \\1", $word);
$word = ltrim($word);
-philip
On Thu, 22 Aug 2002, Hessu wrote:
> Hi,
>
> I have strings like FileName, SoftwareVersion etc.
> How can I add space between words? Somehow with preg_replace perhaps?
> First letter of each word is capitalized.
>
> -Hessu-
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>