/    Sign up×
Community /Pin to ProfileBookmark

Need Help With HTML tags

Hello Guys, Need help with HTML tags …

Let say i have string that i get from database like this :

[code=html]<p><img height="150" alt="" hspace="5" width="200" align="left" vspace="5" src="http://127.0.0.1/Project/FPBank/admin/fckeditor/image/water%20lilies.jpg" />Copyright © 1997 – 2005 by the PHP Documentation Group. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later. A copy of the <a title="Appendix R. Open Publication License" href="mk:@MSITStore:G:GUDANG%20SOFTWAREWEB%20DESIGN%20&%20SERVERServer%20ScriptingPHPNew%20PHP%20Manualphp_manual_en.chm::/opl.license.html">Open Publication License</a> is distributed with this manual, the latest version is presently available at <a class="ulink" target="_blank" href="http://www.opencontent.org/openpub/">» http://www.opencontent.org/openpub/</a>.</p>
<p>Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder.</p>
<p>Distribution of the work or derivative of the work in any standard (paper) book form is prohibited unless prior permission is obtained from the copyright holder.</p>
<p>In case you are interested in redistribution or republishing of this document in whole or in part, either modified or unmodified, and you have questions, please contact the copyright holders at <a class="ulink" target="_blank" href="mailto:[email protected]">» [email protected]</a>. Note that this address is mapped to a publicly archived mailing list.</p>
<p>The <a href="mk:@MSITStore:G:GUDANG%20SOFTWAREWEB%20DESIGN%20&%20SERVERServer%20ScriptingPHPNew%20PHP%20Manualphp_manual_en.chm::/missing-stuff.html#zend">zend</a> section of the documentation is based on an initial contribution by Zend Technologies.</p>[/code]

Could anyone tell me how to remove all the HTML tags, so i only have string without anykind of html tags.

Or someone already make a function contain regular expression to recognize html tags and remove all of it, include the string between the tags like <p>, </p>, <img src=”bla-bla-bla”> …

Please Help Me
Thank’s alot for your answer …

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogOct 22.2007 — [code=php]
$output = strip_tags(html_entity_decode($text));
[/code]
Copy linkTweet thisAlerts:
@baltazhor200401authorOct 22.2007 — Thank You Very Much NogDog ... May GOD Always Bless You ?
×

Success!

Help @baltazhor200401 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...