โดย offing » 14/05/2015 12:10 pm
โจทย์นะคับ
โค้ด: เลือกทั้งหมด
$text = "[attachment=0:3czs9vtz]bb.png[/attachment:3czs9vtz] [img:3czs9vtz]http://thai.ynta.gov.cn/UploadFiles/PhotoGallery/2012/7/201207171713487631.jpg[/img:3czs9vtz] [img:3czs9vtz]http://thai.ynta.gov.cn/UploadFiles/PhotoGallery/2012/7/201207171713487631.jpg[/img:3czs9vtz]";
ผมจะเลือกรูปภาพ 1 รูปจาก attachment หรือ img จะเช็คยังไงว่า attach หรือ img มาก่อนอย่างตัวอย่าง attach มาก่อนก็เอาภาพจาก attach
โจทย์นะคับ
[code] $text = "[attachment=0:3czs9vtz]bb.png[/attachment:3czs9vtz] [img:3czs9vtz]http://thai.ynta.gov.cn/UploadFiles/PhotoGallery/2012/7/201207171713487631.jpg[/img:3czs9vtz] [img:3czs9vtz]http://thai.ynta.gov.cn/UploadFiles/PhotoGallery/2012/7/201207171713487631.jpg[/img:3czs9vtz]";[/code]
ผมจะเลือกรูปภาพ 1 รูปจาก attachment หรือ img จะเช็คยังไงว่า attach หรือ img มาก่อนอย่างตัวอย่าง attach มาก่อนก็เอาภาพจาก attach