php remove html tags 1

php remove html tags

/*  EXAMPLE:	

Bed & Breakfast

-->

Bed & Breakfast

& & " " (unless ENT_NOQUOTES is set) ' ' or ' (ENT_QUOTES must be set) < < > > */ Test", ENT_QUOTES); echo $new;  // Test ?>

Here is what the above code is Doing:
1. The htmlspecialchars() function converts special characters to HTML entities.
2. The ENT_QUOTES parameter tells the function to convert both double and single quotes.
3. The Test string is converted to Test

Similar Posts