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

2005-09-20 Thread Gustav Wiberg
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? /G http://www.varupiraten.se/ -- PHP General

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

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 php-general@lists.php.net Sent: Tuesday, September 20, 2005 2:24 PM Subject: Re: [PHP] Easy question - delete strings from the beginning of space... Gustav Wiberg wrote: Hi

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

2005-09-20 Thread Gustav Wiberg
- Original Message - From: Gustav Wiberg [EMAIL PROTECTED] To: Jochem Maas [EMAIL PROTECTED] Cc: PHP General php-general@lists.php.net Sent: Tuesday, September 20, 2005 3:04 PM Subject: Re: [PHP] Easy question - delete strings from the beginning of space... - Original Message

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