|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
How to strip html encoded stuffs?
I have the following string:
$sOriginal = "<a href=\"asdf.com\">Hello there</a><strong>ABC</strong> <font color=red>XYZ</font>"; $sStripped = strip_tags($sOriginal); echo $sStripped; ..........................and I will get this: helloABC XYZ ....which is correct. BUT, how do I tell it to ignore the   and all those HTML encoded stuffs. btw, doing this for searching. I don't want users to search for the string "nbsp" and the line above appearing, which is wrong. Is there a function to strip all those html encoded stuffs?
__________________
Beginner |
|
#2
|
|||
|
|||
|
preg_split() would be a better option if you are extracting data within html tags...
__________________
~ Joe Penn We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set? Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > How to strip html encoded stuffs? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|