It's like
Show smileys using str_replace() that tutorial. I hope it helps.
PHP Code:
<?php
// Display your form
function form(){
echo "<form action='?act=show' method='post'>"
."<textarea name='text' cols='50' rows='10'></textarea><br>"
."<input type='submit' value='Show'>"
."</form>";
}
function show(){
// Request your text
$text = $_REQUEST['text'];
// This will determine things what you want to replace
$bad_words = array("banana", "tomato", "grape");
// This will determine your text replacement
$fix = array("******", "******", "*****");
$content = str_replace($bad_words, $fix, $text);
// Show your text without bad words
echo $content;
}
switch($act){
default;
form();
break;
case "show";
show();
break;
}
?>
have fun
Example
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
| Need help? Send a
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.