Ef þú ert einn af þessum 20% settu þetta á síðuna þína : <?php $text = ‘very fucking ugly words which are so much fucking crap that its so gay’; $file = file( ‘badwords.txt’ ); for( $i = 0; $i < count( $file ); $i++ ) { $bdwrd1[] = substr( $file[$i], 0, -1 ); $bdwrd2[] = substr( str_repeat( ‘*’, strlen( $file[$i] ) ), 0, -1 ); } $text = str_replace( $bdwrd1, $bdwrd2, $text ); echo $text;