| ereg_replace() | ใช้ตรวจสอบว่า มีข้อความตาม pattern ที่กำหนด ใน text หรือไม่ |
|---|
function:ereg_replace ( pattern, replace_text, text )
return type:string
content:ใช้ตรวจสอบว่า มีข้อความตาม pattern ที่กำหนด ใน text หรือไม่ โดยถ้ามีก็จะแทนที่ข้อความนั้นด้วย replace_text ที่กำหนด โดยการตรวจสอบจะคำนึงถึงตัวพิมพ์ใหญ่ หรือตัวพิมพ์เล็ก
example:echo ereg_replace ( "Bamboo", "Function", "BambooLabCode" );