หมวดสำหรับแบ่งบันความ รู้ต่างๆ จะมีหมวดย่อยๆ ในหมวดนี้ เช่น php, SQL, XML, CSS
Moderators: mindphp, ผู้ดูแลกระดาน
-
Patcharanan.0399
- PHP Hero Member

- Posts: 114
- Joined: 09/04/2018 10:04 am
Post
by Patcharanan.0399 »
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]
-
Attachments
-

- for statement.PNG (3.01 KiB) Viewed 776 times
-

- If statement.PNG (9.02 KiB) Viewed 776 times
-

- pass,break,continue loop 1.PNG (12.26 KiB) Viewed 776 times
-

- pass,break,continue loop.PNG (10.45 KiB) Viewed 776 times
-

- while statement.PNG (3.08 KiB) Viewed 776 times
-

- ผลลัพธ์ Break loop 1.PNG (1.98 KiB) Viewed 776 times
-

- ผลลัพธ์ Break loop.PNG (2.04 KiB) Viewed 776 times
-

- ผลลัพธ์ Continue loop 1.PNG (3.18 KiB) Viewed 776 times
-

- ผลลัพธ์ Continue loop.PNG (2.74 KiB) Viewed 776 times
-

- ผลลัพธ์ for statement.PNG (1.65 KiB) Viewed 776 times
-

- ผลลัพธ์ If statement.PNG (1.31 KiB) Viewed 776 times
-

- ผลลัพธ์ pass loop.PNG (2.91 KiB) Viewed 776 times
-

- ผลลัพธ์ while statement.PNG (3.04 KiB) Viewed 776 times
-

- รูปแบบการเขียน for.PNG (4.58 KiB) Viewed 776 times
-

- รูปแบบการเขียน if.PNG (7.44 KiB) Viewed 776 times
-
-
- 0 Replies
- 520 Views
-
Last post by Sivakorn Phothisat
26/08/2019 11:14 pm
-
-
- 0 Replies
- 516 Views
-
Last post by Four
17/01/2018 4:03 pm
-
-
- 2 Replies
- 1080 Views
-
Last post by EyePornnipa
17/09/2019 2:27 pm
-
-
- 0 Replies
- 5602 Views
-
Last post by Chidchanok
25/02/2019 4:12 pm
Users browsing this forum: No registered users and 6 guests