|
|
|
ช่วยดผุเรื่องโค้ดตัดคำหยาบหน่อยค่ะ พิมคำหยาบๆแล้วมันไม่ขึ้น *** งง |
|
|
|
|
|
|
|
Code (PHP)
function Checkban($string){
$wordrude = array("มึง","กู","duck","fuck","dick","f u c k","d i c k","f.u.c.k","d.i.c.k") ;
$wordchange = ("<font color=\"red\">***</font>") ;
for ( $i=0 ; $i<sizeof($wordrude) ; $i++ ){
$string = eregi_replace ($wordrude[$i] ,$wordchange ,$string);
}
return ($string) ;
}
นำไปใช้ในหน้า webboard
$topicc=Checkban($row_q[2]); echo"$topicc";
$detail=Checkban($row_q[3]); echo"$detail"
งงค่ะ
Tag : PHP, MySQL
|
|
|
|
|
|
Date :
2011-03-01 01:26:31 |
By :
nn |
View :
1274 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|