Which of the looping statements is/are supported by PHP? i) for loop ii) while…
2024
Which of the looping statements is/are supported by PHP? i) for loop ii) while loop iii) do-while loop iv) foreach loop
- A.
(i) and (ii)
- B.
(i), (ii) and (iii)
- C.
(i), (ii), (iii) and (iv)
- D.
More than one of the above
- E.
None of the above
Attempted by 320 students.
Show answer & explanation
Correct answer: C
PHP supports four main types of loops: for, while, do-while, and foreach. Each serves a specific purpose for iteration in programming.
PHP में मुख्य रूप से चार प्रकार के लूप होते हैं: for, while, do-while, और foreach। प्रत्येक का उपयोग पुनरावृत्ति के लिए किया जाता है।