ฟังก์ชัน next()
การใช้ฟังก์ชัน next() เพื่อขยับการชี้ไปที่ element ถัดไป
ตัวอย่าง
$city=array('tokyo','new york','Vancouver','Wellington','Christchurch');
next($city); // <---- ขยับไปหนึ่ง element
next($city); // <---- ขยับไปหนึ่ง element
next($city); // <---- ขยับไปหนึ่ง element
print current($city); // <---- จะพิมพ์ Wellington
0 ความคิดเห็น:
แสดงความคิดเห็น
Click to see the code!
To insert emoticon you must added at least one space before the code.