1. การส่งและรับค่า Arguments ของฟังก์ชันได้ไม่จำกัด โดยไม่จำเป็นต้องกำหนด Arguments ตอนประกาศฟังก์ชัน function foo() { // returns an array of all passed arguments $args = func_get_args(); foreach ($args as $k => $v) { echo “arg”.($k+1).”: $v\n”; } } foo(); /* prints nothing */ foo(‘hello’, ‘world’); … Continue reading
PHP Functions ที่ควรรู้และมีประโยชน์อย่างมาก
Reply