You are here: Re: PHP Tokenize a String by its length « PHP Programming Language « IT news, forums, messages
Re: PHP Tokenize a String by its length

Posted by Geoff Berrow on 12/31/05 16:20

Message-ID: <sSttf.3225$gq4.1485@trndny04> from Lüpher Cypher contained
the following:

>Actually, it's needed :)
>Suppose $string = "aaa bbb ccc" and $length = 9, then:
>first substr leaves "aaa bbb "
>if we don't have the second trim, strrpos returns 8 and second substr
>returns "aaa bbb " so, "aaa bbb ..." will be returned instead of "aaa
>bbb..." :)

Think again.

strrpos returns 7

;-)

--
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/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация