I hope you can understand the question first. {code ...} this is the vb syntax, that is, to do 10 times; php will, and the above process can be done below: {code ...} {code ...} {code ...} {code ...} however, they are all very wordy. Is there a simple way to write them? I hope you can understand the question first,
for 10 next
This is the vb syntax, that is, 10 times;
If php is used, I will do the following:
for($i=0;$i<=9;$i++){}
for(;$i<=9;){$i++;}
for(;;){ if($i=10) break; $i++;}
while($i<=9){ $i++;}
However, they are all very wordy. Is there a simple way to write them?
Reply content:
I hope you can understand the question first,
for 10 next
This is the vb syntax, that is, 10 times;
If php is used, I will do the following:
for($i=0;$i<=9;$i++){}
for(;$i<=9;){$i++;}
for(;;){ if($i=10) break; $i++;}
while($i<=9){ $i++;}
However, they are all very wordy. Is there a simple way to write them?
$i = 10;while($i--) {}
Readable> Simple. A great writer makes readers comfortable.
$a=10;while ($a-->0){ //do something}
It's unnecessary. The code is written to people.
For ($ I = 0; I <= 9; ++ $ I ){}
This is the best.
No, you have all said the syntax, and vb does not have the syntax $ a. $ B, right?