| preg_match_all() | ใช้ตรวจสอบว่า มีข้อความตาม pattern ที่กำหนด ใน text หรือไม่ |
|---|
function:preg_match_all ( pattern, text, keep_array )
return type:boolean
content:ใช้ตรวจสอบว่า มีข้อความตาม pattern ที่กำหนด ใน text หรือไม่ โดยการตรวจสอบจะไม่คำนึงถึงตัวพิมพ์ใหญ่ หรือตัวพิมพ์เล็ก โดยตัวแปร keep_array จะเก็บข้อความที่พบ ( ประมวลผลเร็วกว่าฟังก์ชัน eregi() )
example:if ( preg_match_all ( "[A-Z]", "Hello", $regs ) ) { echo "Find it's"; }