The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Anyone have a html stripper in php?
I am looking for a regular expressions function that will strip the html when I pass a variable through it. I have one for asp, but I am just making my move over to php and google has not turned one up. Just hoping that someone may have one laying around. TIA
|
#2
|
||||
|
||||
Strip?
|
#3
|
||||
|
||||
hmm, are you talking bout the htmlspecialchars function?
|
#4
|
||||
|
||||
PHP Code:
|
#5
|
||||
|
||||
I had a look at what "strip_tags" does and i don't quite understand..
If you assign a variable which is html does it strip the html from the variable? - miSt |
#6
|
||||
|
||||
So would this work?
PHP Code:
|
#7
|
|||
|
|||
No, but this will
PHP Code:
|
#8
|
||||
|
||||
ahhh but why the quotes?
I was once told quotes aren't needed when assigning a variable? - miSt |
#9
|
||||
|
||||
Quotes are needed in variables that contain strings which include spaces in them, characters such as the exclamation mark that could conflict with code syntax, or HTML, javascript, etc.
Will work: PHP Code:
PHP Code:
|
#10
|
||||
|
||||
ahhh thanks for explaining it to me !
- miSt |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|