Jump to content

[SOLVED] simple str_replace help


quickstopman

Recommended Posts

Heres something I cooked up:

 

<?php
$something = $_POST['quote'];
$replace = array("javascript", "html", "body");
$replaced = str_replace($replace, "...", "$something");
echo "$replaced";
?>

 

Should work fine. Just add array elements to $replace with words you want to be replaced.

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.