Re: PHP Tokenize a String by its length



Message-ID: <ZFwtf.636$i%4.91@trndny08> from Lüpher Cypher contained the
following:

>Actually:
>
>$str = "aaa bbb ccc";
>$str = substr($str,0,9);
>echo strrpos($str," ");

ah yes, missed the double space...
>
>
>Outputs 8 :) There is a mistake, though:

I knew something was wrong. :-)

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
.



Relevant Pages

  • Re: Saving selection in drop-down lists in PHP after page reload?
    ... Did I make a mistake? ... Geoff Berrow (put thecat out to email) ... Simple RFDs http://www.ckdog.co.uk/rfdmaker/ ...
    (comp.lang.php)
  • Re: selecting data from two different tables
    ... I suspect this has been done before, but why is left join better than ... Geoff Berrow ... Simple RFDs http://www.ckdog.co.uk/rfdmaker/ ... Prev by Date: ...
    (comp.lang.php)
  • Re: Word Count
    ... >OMG why does this not appear in the results to a search on "word count"?! ... Geoff Berrow ... Simple RFDs http://www.ckdog.co.uk/rfdmaker/ ... Prev by Date: ...
    (comp.lang.php)
  • Re: transffering variables (NEWBIE)
    ... >and that should be enough to display the right image, ... Geoff Berrow ... Simple RFDs http://www.ckdog.co.uk/rfdmaker/ ... Prev by Date: ...
    (comp.lang.php)
  • Re: Webcams
    ... what have you got against Sexy Sandra in MK? ... Geoff Berrow ... Simple RFDs http://www.ckdog.co.uk/rfdmaker/ ... Prev by Date: ...
    (uk.rec.walking)