Jump to content

allowing only certain html tags using strip_tags


gtridez

Recommended Posts

And this lets <p> <a href=''> </a> and <p> through. Too easy.

[code=php:0]
<?php
  $a = "<p><a href=''>this is a paragrapgh</a></p>";
  echo strip_tags($a,"<p><a>");
?>
[/code]

EDIT: The [ / url] is meant to be a closing < / a >, thats the forum playin with it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.