Re: [PHP] Strip alternating spaces in first word of paragraph

2005-02-23 Thread Aaron Gould
Burhan Khalid wrote: $string = 'E n d l e s s insanity here!'; $letters = explode(" ",$string); foreach ($letters as $key => $letter) { if (strlen($letter) == 1) { //Possible letter of our first word $word .= $letters[$key]; } else { $split_point = $key;

Re: [PHP] Strip alternating spaces in first word of paragraph

2005-02-23 Thread Richard Lynch
Aaron Gould wrote: > I have a series of paragraphs in which the first word contains > alternating spaces. How can I strip out the spaces of only this first > word, while leaving the remainder of the paragraph untouched? > > Here's an example: > > T h i s is the first paragraph. Only the first word

Re: [PHP] Strip alternating spaces in first word of paragraph

2005-02-23 Thread Burhan Khalid
Aaron Gould wrote: I have a series of paragraphs in which the first word contains alternating spaces. How can I strip out the spaces of only this first word, while leaving the remainder of the paragraph untouched? This is not a solution, but something you can start off with. I haven't error che