Al wrote:
André Medeiros wrote:
Greetings.
I am trying to trim some text containing HTML tags. What I want to do is
to trim the text without trimming the tags or html entities like nbsp;
and such, wich completelly break the design.
Has anyone succeded on doing such a thing? phpclasses.org
I've succeded on doing this task :)
I had to make a few assumptions (like HTML is formatted correctly),
but, other than that, it worked just fine.
I'll post the code on monday.
Thanks for all your help guys. You've been GEAT (you know... like
Tony says ;) )
On 7/17/05, Al [EMAIL PROTECTED]
André Medeiros wrote:
Greetings.
I am trying to trim some text containing HTML tags. What I want to do is
to trim the text without trimming the tags or html entities like nbsp;
and such, wich completelly break the design.
Has anyone succeded on doing such a thing? phpclasses.org won't help :(
Hello Ashley,
?
$string = trim($string);
$string = preg_replace(/span class[^]+modified by.*?\/span\.$/is, ,
$string);
// remove the \. if it doesn't end in a full
stop^
?
Try that.
James
Ashley M. Kirchner [EMAIL PROTECTED] wrote in message
[EMAIL
4 matches
Mail list logo