我有一个嵌套的for循环,需要延迟大约10秒钟才能继续处理下一组数据。
for($i=0; $i<10; $i++)
{
sleep(10);
for($j=0; $j<80; $j++)
{
echo "asd :".$j."<br />";
}
echo "def :".$i."<br />";
}
通过这种方式,每80个关键字睡眠10秒钟便会进行一次抓取,然后继续进行下一组操作。在前80个关键字之后无效。
It is working fine and it also going on the next group set also.
if you want to go to the 80 count than you should replace in the second for loop condition with this ($j<=80)
如果还有其他问题与该问题相关,则不告诉