Mon Mar 04 2024 01:12:37 GMT+0000 (Coordinated Universal Time)
Saved by @codewarrior
for ($i = 1; $i <= 10; $i++) { if ($i == 5) { break; // exit the loop when $i equals 5 } echo $i . " "; } // Output: 1 2 3 4
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments