Re: [PHP] sentence case

2005-02-28 Thread John Nichel
Stephen Johnson wrote: OK -- dumb question -- what is an OP? Original Poster -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] sentence case

2005-02-28 Thread Stephen Johnson
sts > Subject: Re: [PHP] sentence case > > > What if the OP doesn't like touching worms? ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] sentence case

2005-02-23 Thread Jochem Maas
Diana Castillo wrote: with php, HOW CAN I CONVERT SENTENCES LIKE THIS . TO BE UPPER AND LOWER CASE to become like this : How can I convert sentences like this. To be upper and lower case. here is something I hacked together for Smarty once, modified a bit to suit your need more (syntax-checked onl

Re: [PHP] sentence case

2005-02-23 Thread Leif Gregory
Hello Mattias, Wednesday, February 23, 2005, 12:35:21 PM, you wrote: M> Oh, and sentences may end with other characters, too. Notably "!" M> and "?". Nuh-u Prove it!(Oh dang..) -- Leif (TB lists moderator and fellow end user). Using The Bat! 3.0.2.3 Rush under Windows XP 5.1 Bu

Re: [PHP] sentence case

2005-02-23 Thread Mattias Thorslund
Leif Gregory wrote: Hello Chris, Wednesday, February 23, 2005, 11:49:32 AM, you wrote: C> And on top of that he'll need to convert all 'i' to 'I' because of C> step 1. You and Mattias both have valid points. The only other thing I can think of is a regexp that is searching for a period and a space

Re: [PHP] sentence case

2005-02-23 Thread Leif Gregory
Hello Chris, Wednesday, February 23, 2005, 11:49:32 AM, you wrote: C> And on top of that he'll need to convert all 'i' to 'I' because of C> step 1. You and Mattias both have valid points. The only other thing I can think of is a regexp that is searching for a period and a space then does a ucwo

Re: [PHP] sentence case

2005-02-23 Thread John Nichel
Jay Blanchard wrote: [snip] That won't work because it'll only capitalize the first letter of the string. Since his string contains more than one sentence he needs to be able to capitalize the first letter of each sentence. [/snip] I was teaching the OP to fish instead of baiting the hook for her.

Re: [PHP] sentence case

2005-02-23 Thread Mattias Thorslund
Chris W. Parker wrote: Leif Gregory on Wednesday, February 23, 2005 10:31 AM said: I'm thinking something like: 1. strtolower() the string 2. explode() on the period 3. Loop through the resulting array a. trim() whitespace on each element b. ucfirst() on each el

RE: [PHP] sentence case

2005-02-23 Thread Jay Blanchard
[snip] That won't work because it'll only capitalize the first letter of the string. Since his string contains more than one sentence he needs to be able to capitalize the first letter of each sentence. [/snip] I was teaching the OP to fish instead of baiting the hook for her. -- PHP General Mail

RE: [PHP] sentence case

2005-02-23 Thread Chris W. Parker
Leif Gregory on Wednesday, February 23, 2005 10:31 AM said: > I'm thinking something like: > > 1. strtolower() the string > 2. explode() on the period > 3. Loop through the resulting array >a. trim() whitespace on each element >b. ucfirst() on each element o

Re: [PHP] sentence case

2005-02-23 Thread Leif Gregory
Hello Jay, Wednesday, February 23, 2005, 11:05:51 AM, you wrote: >> How can I convert sentences like this. To be upper and lower case. J> http://www.php.net/ucfirst That won't work because it'll only capitalize the first letter of the string. Since his string contains more than one sentence he

Re: [PHP] sentence case

2005-02-23 Thread Aaron Gould
Diana Castillo wrote: with php, HOW CAN I CONVERT SENTENCES LIKE THIS . TO BE UPPER AND LOWER CASE to become like this : How can I convert sentences like this. To be upper and lower case. Sounds like you need a combination of ucfirst() and strtolower(). $newstring = ucfirst(strtolower($oldstring));

RE: [PHP] sentence case

2005-02-23 Thread Jay Blanchard
[snip] with php, HOW CAN I CONVERT SENTENCES LIKE THIS . TO BE UPPER AND LOWER CASE to become like this : How can I convert sentences like this. To be upper and lower case. [/snip] http://www.php.net/ucfirst -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.n

[PHP] sentence case

2005-02-23 Thread Diana Castillo
with php, HOW CAN I CONVERT SENTENCES LIKE THIS . TO BE UPPER AND LOWER CASE to become like this : How can I convert sentences like this. To be upper and lower case. -- Diana Castillo Global Reservas, S.L. C/Granvia 22 dcdo 4-dcha 28013 Madrid-Spain Tel : 00-34-913604039 Ext 216 Fax : 00-34-9152