วันอาทิตย์ที่ 11 พฤษภาคม พ.ศ. 2557

20:25
ฟังก์ชัน strrchr()
ค้นหาส่วนของสตริงสุดท้ายที่พบตัวอักษรตามกำหนด ด้วยฟังก์ชัน strrchr()


ฟังก์ชัน strrchr() จะ return ส่วนที่เหลือของสตริงที่พบคำตามที่กำหนด

รูปแบบ
strrchr(string , char)
string คือ สตริง

char คือ คำที่ต้องการค้น
ถ้าเป็นตัวเลข จะค้นตัวอักษรที่ตรงกับเลข ascii

ตัวอย่าง
<?php

echo strrchr("Hello world","world");
?>


ผลลัพธ์
world

0 ความคิดเห็น:

แสดงความคิดเห็น

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.