ckennerdale
Programmer
what I wantto do it to take a string out of a mysql database,and strip allhtml/ email tags that have been inserted in.
So I have text similar to
'<a href="mailto:foo@foo.com">foo@foo.com</a>'
and I want it turn into just 'foo@foobar.com'. Obviously the actual email addresses or web addresses will vary.
I have used eregi_replace before with success,but here the stuff that needs to be stripped or replaced will vary.(as emails vary)
#Ultimately what I am trying to acheive is this-
I have an 'add' form into my database which adds special charaters, <br> lines etc.However when I pull down the record into mt 'edit' page , it also pulls down the special formattingI havedone- which is fine,but when I update the record ,it parses through the process again.Thjis results in allmy urls, emails and <br> lines doubling.
So I reckoned that if I strippedthem out for the editing view and then reapplied the formatting to the whole string as I update the database this wouldbe the best courseof action.
Any ideas? Caspar Kennerdale
Senior Media Developer
So I have text similar to
'<a href="mailto:foo@foo.com">foo@foo.com</a>'
and I want it turn into just 'foo@foobar.com'. Obviously the actual email addresses or web addresses will vary.
I have used eregi_replace before with success,but here the stuff that needs to be stripped or replaced will vary.(as emails vary)
#Ultimately what I am trying to acheive is this-
I have an 'add' form into my database which adds special charaters, <br> lines etc.However when I pull down the record into mt 'edit' page , it also pulls down the special formattingI havedone- which is fine,but when I update the record ,it parses through the process again.Thjis results in allmy urls, emails and <br> lines doubling.
So I reckoned that if I strippedthem out for the editing view and then reapplied the formatting to the whole string as I update the database this wouldbe the best courseof action.
Any ideas? Caspar Kennerdale
Senior Media Developer