|
|
|
รบกวนดูทีคบว่าฟังชันนี้มีการทำงานอย่างไรคับ function CheckSmile($temp){ |
|
|
|
|
|
|
|
function CheckSmile($temp){
global $url;
$text = array(
":sad:",":red:", ":big:", ":ent:", ":shy:", ":sleepy:", ":sun:", ":sg:", ":embarass:",
":dead:", ":cool:", ":clown:", ":pukey:", ":eek:", ":roll:", ":smoke:", "", ":confused:", ":cry:",
":lol:", ":yawn:", "", "", "","",":crazy:","","","",
"","","","","","","","","","","","",
"","","","","","","","");
$pic =array(
"frown.gif","redface.gif","biggrin.gif","blue.gif","shy.gif","sleepy.gif","sunglasses.gif", "supergrin.gif","embarass.gif",
"dead.gif","cool.gif","clown.gif","pukey.gif","eek.gif","sarcblink.gif","smokin.gif","reallymad.gif","confused.gif","crying.gif",
"lol.gif","yawn.gif","devil.gif","tongue.gif","aysmile.gif","tasty.gif","grazy.gif","agree.gif","disagree.gif","bawling.gif",
"crap.gif","crying1.gif","dunce.gif","error.gif","evil.gif","lookaroundb.gif","laugh.gif","pimp.gif","spiny.gif","wavey.gif","smash.gif","angry.gif",
"brain.gif","phone.gif","zip.gif","download.gif","beer.gif","censore.gif","nolove.gif","cranium.gif");
for ($i=0 ; $i<sizeof($text) ; $i++) {
$temp = eregi_replace($text[$i],"<img src=\"./pic/$pic[$i]\">",$temp);
}
return($temp);
}
Tag : - - - -
|
|
|
|
|
|
Date :
28 ม.ค. 2550 23:14:23 |
By :
ve |
View :
1549 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ที่ดูน่าจะเป็นfunctionที่น่าจะใช้คู่กับscriptในการใส่emotionอ่ะครับเป็นการเปรียบเทียบอ่ะเช่น$text[1]แทนด้วย]<img src=\"./pic/$pic[1]>อย่างงี้อ่ะครับ
|
|
|
|
|
Date :
29 ม.ค. 2550 01:16:18 |
By :
luckylovely |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|