for循环如何重新返回最开始处重新循环啊

WBOY
Release: 2016-06-13 12:53:30
Original
1893 people have browsed it

for循环怎么重新返回最开始处重新循环啊?
for(i=0;i if(i==7){
$a=123;// 到这我想重新开始循环 且下次这里不在执行
}


}


------解决方案--------------------
从新再 给 $i  赋值为0 

不执行那里可以 设个标志位去判断
------解决方案--------------------
for(i=0;i   if($a==123){
    continue;
  }
  if(i==7){
    $a=123;// 到这我想重新开始循环 且下次这里不在执行
    continue;
  }
}
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template