Re: A compress function?

From: Date: Fri, 04 Jan 2002 23:54:48 +0000
Subject: Re: A compress function?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-79508@lists.php.net to get a copy of this message
Not even close. I'm after a function to compress multiples of the same character to one instance, as in my stated example, 30 spaces to 1 space, not compressing the string. Emil offered a good substitute. -- Gaylen gfraley5@earthlink.net Home http://www.gaylenandmargie.com/ PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "George Nicolae" <geomasterweb@hotmail.com> wrote in message news:20020104165718.57800.qmail@pb1.pair.com... > take a look at > http://www.php.net/manual/en/function.bzcompress.php > > -- > > > Best regards, > George Nicolae > IT Manager > ___________________ > X-Playin - Professional Web Design > www.x-playin.f2s.com > > > > "Gaylen Fraley" <gfraley5@earthlink.net> wrote in message > news:20020104121434.96886.qmail@pb1.pair.com... > > With all the wonderful String functions in PHP, I haven't been able to > find > > a str_compress(). Is there such an animal? Let's say I have a string > like > > this: > > > > $myString = First_word <30 spaces> second_word <10 spaces> etc... > > > > I need to do one of two things. Either compress the multiple spaces to > one > > and then use explode to break the string on a single space, or can someone > > explain another way to break $myString into only those pieces that > contain > > usable text w/o spaces? > > > > Thanks! > > > > -- > > Gaylen > > gfraley5@earthlink.net > > Home http://www.gaylenandmargie.com/ > > PHP KISGB v3.02 Guest Book > > http://www.gaylenandmargie.com/phpwebsite/ > > > > > > > >

« previous php.general (#79508) next »