• Home
  • About
  • Downloadables
  • Weightloss for Recessive Times

Kibo …

… keeping meat fresh since 1970

Feed on
Posts
Comments

Strip HTML Tags

May 18th, 2005 by Intermanaut

Fairly self-explanatory. This example gets its input from a file called ‘filename’, strips the HTML markup and displays what’s left in the browser.

<?

$fp=fopen (“filename”,”r”);

$file=fread ($fp,filesize (“filename”));

$fclose($fp);

$pattern=”‘<[\/\!]*?[^<>]*?>’si”;

$replace=”";

$file = preg_replace ($pattern, $replace, $filev[$r]);

print “$file”;

?>

Posted in PHP | No Comments

Comments are closed.

  • Recent Posts

    • Motorola MotoActv Review
    • Exceptionally Poor Grammar
    • The Adjustment Bureau
    • Unkown
    • Paul
  • Things

    • About
    • Addresses worth banning from your forum
    • Downloadables
    • Foamcore Macro Studio
    • Multiplicity: Pouring yourself a beer
    • Multiplicity: The five of me
    • Ross on Wye: What a Mess
    • Weightloss for Recessive Times
  • Stuff

    • Conversations (22)
    • Movies (21)
    • Programming (12)
      • ASP (3)
      • JavaScript (6)
      • PHP (2)
      • VBA (1)
    • Rambles (265)
      • Angry (48)
      • Happy (21)
    • Blogroll

      • 1 city, 2 people, 24 hours
      • del.icio.us
      • EmmieJay – guilt-free style
      • flickr

Kibo … © 2012 All Rights Reserved.

MistyLook made free by Web Hosting Bluebook