email a file after the file is x lines long

From: Date: Fri, 06 Jul 2001 20:57:07 +0000
Subject: email a file after the file is x lines long
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-56575@lists.php.net to get a copy of this message
Is it possible the set a script to email a file after it becomes so many lines long ? I have an email address that accepts only catalog requests and I'd like to be able to have a complete list mailed to me instead of doing it one at a time. any suggestions are appreciated Thanks, Jerry Lake Interface Engineering Technician Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.com -----Original Message----- From: Steve Edberg [mailto:sbedberg@ucdavis.edu] Sent: Friday, July 06, 2001 1:29 PM To: Chad Day; php-general@lists.php.net Subject: [PHP] Re: string formatting help In the original message below, did you mean that you're actually SEEING the <br> tags in the output? If so, there may be a conversion with htmlentities() going on somewhere that converts the <br> tags to &lt;br&gt; (so they are displayed instead of being interpreted). If you replaced the <br>'s with spaces or newlines, the output _should_ all be on one line, since HTML considers ALL strings of whitespace (tabs, newlines, returns, spaces) to be a single space. If you replaced <br>'s with newlines and you are getting the line breaks still, your output may be in a <pre>...</pre> block. - steve At 3:36 PM -0300 7/6/01, "InÈrcia Sensorial" <inerte@hotmail.com> wrote: > Maybe: > >$array = explode("<br>", $string); > >foreach ($array as $key => $value) { > echo "$value"; >} > > Would separate the string by <br>'s and print all in one line. > Or, more compactly: echo str_replace('<br>', '', $string); This would only work if tags were lowercased; to handle mixed case, you'd need to do echo eregi_replace('<br>', '', $string); or use the preg equivalent > Julio Nobrega. > >A hora est· chegando: >http://sourceforge.net/projects/toca > >"Chad Day" <cday@atpco.com> wrote in message >news:NFBBLNJBKLPPMKEJAKCOEEJNCHAA.cday@atpco.com... >> I'm trying to pull a string from a database to use in a javascript >> function.. but it's doing line breaks on me, which in turn messes up the >> javascript. >> >> The string in the mysql db is like: >> kjdsakjadk<br>skjdks<br><br>kjkdfjdfkjfd >> >> When I pull it out, it becomes: >> >> kjdsakjadk >> <br> >> skjdks >> <br> >> <br> >> kjkdfjdfkjfd >> >> I've tried replacing the br's with blank spaces or new line characters, >but >> in the html code it still breaks on those breaks when I echo it back out. >> How can I force this string to be all on one line? >> >> Thanks, > > Chad >> -- +------ Factoid: Of the 100 largest economies in the world, 51 are ------+ | Steve Edberg University of California, Davis | | sbedberg@ucdavis.edu Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +--- corporations ------ http://www.ips-dc.org/reports/top200text.htm ---+ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#56575) next »