문제

I need to

  1. echo
  2. save what is echoed to variable
  3. do not display that echo

because I need to.

As far I was sure it could be done with buffers like:

ob_start();
$parallelcurl->startRequest($data[$name]['repository'], 'requestDone_list');
array_push($repository, ob_get_contents());
ob_end_flush();

But it actually echoes things saving them but no erase - I see loads of echoes that I dont want to.

도움이 되었습니까?

해결책

You don't want ob_end_flush(), you need ob_end_clean();.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top