php echo the result while iterating through the loop

后端 未结 2 1033
没有蜡笔的小新
没有蜡笔的小新 2021-01-24 22:40

I am execution loop and inside loop there is data processing function inside loop.

  for($i = 0 ; $i <=680 ; $i = $i + 40)
    {
          $url = \'http://www         


        
2条回答
  •  忘掉有多难
    2021-01-24 23:19

    PHP buffers the output.

    If you want to output stuff to the browser immediately you can use the flush() and ob_flush() functions:

    for ($i = 0; $i <= 680; $i += 40) {
        $url = 'http://www.yelp.com/biz/franchino-san-francisco?start=80';
        $root = yelp($url);
        var_dump($root);
        flush();
        ob_flush();
    }
    

提交回复
热议问题