Re: [PHP] Easy question - delete strings from the beginning of space...

2005-09-20 Thread Jordan Miller
to get rid of potential double spaces after the explode, you could do: foreach ($words as $word) { if (!empty($word)) { $first = $word; break; } } echo $first; This will always return the first word. Jordan On Sep 20, 2005, at 7:24 AM, Jochem Maas wrote: how much eas

Re: [PHP] Easy question - delete strings from the beginning of space...

2005-09-20 Thread Gustav Wiberg
- Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]> To: "Gustav Wiberg" <[EMAIL PROTECTED]> Cc: "PHP General" Sent: Tuesday, September 20, 2005 2:24 PM Subject: Re: [PHP] Easy question - delete strings from the beginning of space...

Re: [PHP] Easy question - delete strings from the beginning of space...

2005-09-20 Thread Jochem Maas
Gustav Wiberg wrote: Hi there! I guess this is an easy question. I have string... "Hello you" and I want to get the "Hello" part. How do I do that? (I can of course search for first occurence of space and then use substr, but I guess there is an easier solution? how much easier do you want