On Tuesday 28 May 2002 23:58, Andre Dubuc wrote:
> Is there a way to get a function similar to 'ucfirst' to work with the
> first letters of a set of strings in textarea strings?
>
> ******************************************************
> Inputted strings:
>
> "hi. i hope there is one. any ideas?"
>
> Should appear:
> "Hi. I hope there is one. Any ideas?"
>
> ******************************************************
>
> Would it be possible to do a 'foreach' 'ucfirst' type of statement while
> reading a string and breaking it apart at punctuation marks?

use explode() to break into sentences on whatever you deem to be a sentence 
boundary (period, exclamation mark, question mark, whatever).

foreach() through the resulting array applying ucfirst(). Then join them all 
up again.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Patriotism is the virtue of the vicious.
                -- Oscar Wilde
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to