Frage

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.

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top