If statement ควบคุมการทำงานโดยใช้การแบ่งบล๊อคและการย่อหน้าแทนการใช้เครื่องหมาย {...}
[attachment=0]รูปแบบการเขียน if.PNG[/attachment] [attachment=13]If statement.PNG[/attachment] [attachment=4]ผลลัพธ์ If statement.PNG[/attachment]
For Loop statement คือการทำงานซ้ำจนกว่าจะพบว่าเป็นเท็จ โดยกำหนดช่วงการทำงานให้ใช้งานคู่กับ ' in '
[attachment=1]รูปแบบการเขียน for.PNG[/attachment] [attachment=14]for statement.PNG[/attachment] [attachment=5]ผลลัพธ์ for statement.PNG[/attachment]
Loop Control Statement ทำหน้าที่เปลี่ยนลำดับการทำงาน ได้แก่ Pass , Break , Continue
[attachment=11]pass,break,continue loop.PNG[/attachment] [attachment=3]ผลลัพธ์ pass loop.PNG[/attachment] [attachment=8]ผลลัพธ์ Break loop.PNG[/attachment] [attachment=6]ผลลัพธ์ Continue loop.PNG[/attachment]
While Loop statement คือการทำงานซ้ำโดยไม่ทราบจำนวนรอบที่แน่นอนเหมือนกับ For Loop และจะทำงานจนกว่าเงื่อนไขจะเป็นเท็จ
[attachment=10]while statement.PNG[/attachment] [attachment=2]ผลลัพธ์ while statement.PNG[/attachment]
Loop Control Statement จะทำหน้าที่เช่นเดียวกับ Loop Control Statement ใน For Loop
[attachment=12]pass,break,continue loop 1.PNG[/attachment] [attachment=9]ผลลัพธ์ Break loop 1.PNG[/attachment] [attachment=7]ผลลัพธ์ Continue loop 1.PNG[/attachment]
If statement , For และ While loop statement....?
Moderator: mindphp, ผู้ดูแลกระดาน
-
- PHP Hero Member
- โพสต์: 114
- ลงทะเบียนเมื่อ: 09/04/2018 10:04 am
If statement , For และ While loop statement....?
- แนบไฟล์
-
- for statement.PNG (3.01 KiB) Viewed 3289 times
-
- If statement.PNG (9.02 KiB) Viewed 3289 times
-
- pass,break,continue loop 1.PNG (12.26 KiB) Viewed 3289 times
-
- pass,break,continue loop.PNG (10.45 KiB) Viewed 3289 times
-
- while statement.PNG (3.08 KiB) Viewed 3289 times
-
- ผลลัพธ์ Break loop 1.PNG (1.98 KiB) Viewed 3289 times
-
- ผลลัพธ์ Break loop.PNG (2.04 KiB) Viewed 3289 times
-
- ผลลัพธ์ Continue loop 1.PNG (3.18 KiB) Viewed 3289 times
-
- ผลลัพธ์ Continue loop.PNG (2.74 KiB) Viewed 3289 times
-
- ผลลัพธ์ for statement.PNG (1.65 KiB) Viewed 3289 times
-
- ผลลัพธ์ If statement.PNG (1.31 KiB) Viewed 3289 times
-
- ผลลัพธ์ pass loop.PNG (2.91 KiB) Viewed 3289 times
-
- ผลลัพธ์ while statement.PNG (3.04 KiB) Viewed 3289 times
-
- รูปแบบการเขียน for.PNG (4.58 KiB) Viewed 3289 times
-
- รูปแบบการเขียน if.PNG (7.44 KiB) Viewed 3289 times
- Ann2524
- PHP Newbie
- โพสต์: 1
- ลงทะเบียนเมื่อ: 15/04/2024 10:33 am
Re: If statement , For และ While loop statement....?
ขอสแตนเม้นท์ย้อนหลังทางอีเมล์3เดือนคะ
-
- Similar Topics
- ตอบกลับ
- แสดง
- โพสต์ล่าสุด
-
- 0 ตอบกลับ
- 2389 แสดง
-
โพสต์ล่าสุด โดย Sivakorn Phothisat
26/08/2019 11:14 pm
-
- 0 ตอบกลับ
- 7308 แสดง
-
โพสต์ล่าสุด โดย Four
17/01/2018 4:03 pm
-
-
โพสต์ใหม่ การขอ STATEMENT ธนาคารไทยพาณิชย์ SCB
โดย Chidchanok » 25/02/2019 4:12 pm » ใน Accounting software & ERP โปรแกรมบัญชี ระบบอีอาร์พี - 0 ตอบกลับ
- 10801 แสดง
-
โพสต์ล่าสุด โดย Chidchanok
25/02/2019 4:12 pm
-
-
-
โพสต์ใหม่ การขอ STATEMENT ธนาคารออมสิน
โดย EyePornnipa » 16/09/2019 4:50 pm » ใน ถาม - ตอบ ธุรกิจ กฏหมาย ภาษี บัญชี - 1 ตอบกลับ
- 1714 แสดง
-
โพสต์ล่าสุด โดย thatsawan
16/09/2019 5:11 pm
-
ผู้ใช้งานขณะนี้
สมาชิกกำลังดูบอร์ดนี้: Majestic-12 [Bot] และบุคลทั่วไป 67