$sql = "SELECT * FROM `allowed_tags` ORDER BY `tag` ASC"; $result = @mysql_query($sql,$conn) or die(mysql_error()); while($row = mysql_fetch_array($result)) { $tag = $row['tag']; $bio = strip_tags($bio,"$tag"); }