Snippet description Snippet class
XHTML-base XHTML
Open image in new window JavaScript
Escape variables PHP
Fread-example PHP
SQL-timestamp to normal date PHP
Remove HTML-tags from string PHP
Formatting MySQL-datetime PHP
on Rollover go to frame Flash
Hiddenable box XHTML / CSS / JS


<?php

  
/*
  Remove HTML-tags from string. For example:
  Before:
      This <b>string</b> has many <a href="http://www.toni.fi/
      title=" ">links</a> and other <span style="color: #ff0000;">types
      of HTML-tags</span> in it.
  After:
      This string has many links and other types of HTML-tags in it.
  */

  
$new_string preg_replace("@<[\/\!]*?[^<>]*?>@si",""$old_string);

?>