I'm trying to download multiple files while parsing an array, this is a snippet of the Class I wrote. Please advise what I'm doing wrong.
It only downloads the first iteration.
foreach($ad_row as $row){
header("Content-type: application/msword");
header("Content-Disposition: attachment;Filename={$title}.doc");
$first = '<!DOCTYPE html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><body><table><tbody><tr><td>';
$last = '</td></tr></tbody></table></body></html>';
echo $first.$ad_doc->saveHTML($row).$last;
ob_clean();
flush();
}//end foreach
Thanks
éléments. You'll parse the page and each p element become a force downloaded word document. In a nutshell that's what I'm trying to accomplish
– hayonj Mar 27 '17 at 22:02