Why not preg_split ( http://nz.php.net/manual/en/function.preg-split.php ):
$str = 'SCOTTSDALE, AZ 85254';
$ar = preg_split('/,? ?/', $str); //optional comma, followed by optional
space
// $ar = array('SCOTTSDALE', 'AZ', '85254');
On Sat, Dec 6, 2008 at 1:18 PM, Jason Todd Slack-Moehrle <
[EMAIL
tedd wrote:
At 4:18 PM -0800 12/5/08, Jason Todd Slack-Moehrle wrote:
How might I also parse and address like: SCOTTSDALE, AZ 85254
It has a comma and a space
-Jason
On Dec 5, 2008, at 4:02 PM, Jason Todd Slack-Moehrle wrote:
OK, making good learning progress today.
I have a string that is
u can use split() or explode ().
Thanks
On Sat, Dec 6, 2008 at 9:27 AM, tedd <[EMAIL PROTECTED]> wrote:
> At 4:18 PM -0800 12/5/08, Jason Todd Slack-Moehrle wrote:
>
>> How might I also parse and address like: SCOTTSDALE, AZ 85254
>>
>> It has a comma and a space
>>
>> -Jason
>>
>> On Dec 5, 200
At 4:18 PM -0800 12/5/08, Jason Todd Slack-Moehrle wrote:
How might I also parse and address like: SCOTTSDALE, AZ 85254
It has a comma and a space
-Jason
On Dec 5, 2008, at 4:02 PM, Jason Todd Slack-Moehrle wrote:
OK, making good learning progress today.
I have a string that is: Jason Slack
How might I also parse and address like: SCOTTSDALE, AZ 85254
It has a comma and a space
-Jason
On Dec 5, 2008, at 4:02 PM, Jason Todd Slack-Moehrle wrote:
OK, making good learning progress today.
I have a string that is: Jason Slack
and I want it broken at the space so i get Jason and the
On 10/15/07, Richard Heyes <[EMAIL PROTECTED]> wrote:
>
> Philip Thompson wrote:
> > ...
>
> $str = 'thisIsAStringIHave';
>
> echo ucfirst(preg_replace('/([A-Z])/', ' $1', $str));
> ?>
>
> HTH
Ha! I knew there was a much easier way. My brain is still not working this
Monday morning
Philip Thompson wrote:
> ...
HTH
--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk
Knowledge Base and HelpDesk software
that can cut the cost of online support
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 10/15/07, Philip Thompson <[EMAIL PROTECTED]> wrote:
> Hi.
>
> Before I try and reinvent the wheel, I thought I'd query the list. I want to
> take this string:
>
> thisIsAStringIHave
>
> and turn it into:
>
> This Is A String I Have
>
> Essentially, I want to capitalize the first letter (ucfirst
8 matches
Mail list logo