Trimming text
| From: | Ashley M. Kirchner | Date: | Wed, 24 Apr 2002 07:05:12 +0000 |
| Subject: | Trimming text | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-94313@lists.php.net to get a copy of this message | ||
I have a variable ($description) that contains text data (pulled from an MySQL DB). I need to
delete the last few lines from that data. Prior to the data getting submitted to the DB (during a
different routine), the following information gets added:
$description .= "\n\n< span class=gensmall >Modified by
".$userdata[username]."< /span >.";
(spaces added so the tags don't get parsed)
Later in the routine, that data gets pulled back up for modification and I need to delete that
last bit from it. From the starting '\n' till the end '< /span >.'...
What's the best, and or easiest way to do this?
--
H | "Life is the art of drawing without an eraser." - John Gardner
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:ashley@pcraft.com> .
303.442.6410 x130
Director of Internet Operations / SysAdmin . 800.441.3873 x130
Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave, #6
http://www.pcraft.com ..... . . . Boulder, CO 80303,
U.S.A.