Re: limiting lines

From: Date: Sun, 29 Jul 2001 12:09:42 +0000
Subject: Re: limiting lines
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-60096@lists.php.net to get a copy of this message
Hiya Dan, If you're expecting new lines, you could do this: $length = explode("\n", $message); if (sizeof($length) > 55) { // error } And also limit the number of characters, using strlen() James "Dan" <dan@mojolin.com> wrote in message news:Pine.LNX.4.20L2.0107290702230.30452-100000@www.mojolin.com... > Hi, > > I would like to run a variable of unlimited length through a filter that > would limit its length to 55 lines (ie limiting it's length to less than 1 > printed page). Does anyone know of an easy way to do this? > > thanks. > > Regards, > > Dan Barber > Mojolin > > --------------- > Mojolin: The Open Source/Linux Employment Site > http://www.mojolin.com > >

« previous php.general (#60096) next »