In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what are the ways to write the php for cycle". Interested friends may wish to take a look at it. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what are the ways to write the php for cycle?"
Php for loop can be written in two ways: 1, "for (expr1; expr2; expr3) {...}"; 2, "for (expr1; expr2; expr3) {if (...) {} break;}." The way.
How many ways to write a php for loop?
Writing and examples of PHP for loops
For loop is one of the most recent loop statements, no matter what language, there is this loop statement, and it is also a common loop method in our work.
Grammar rules:
For (expr1; expr2; expr3) {Code to be executed}
Expr1: indicates where the loop begins
Expr2: the condition of the loop. If the value is TRUE, the loop continues and the nested loop statement is executed. If the value is FALSE, the loop is terminated.
Expr3: evaluated (and executed) after each loop.
The writing is a little obscure, let's write the simplest for loop demo!
For Loop demo1:
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.