php force download csv April 14, 2023 by wordlinkanswers php force download csv Comment 0 header(‘Content-Type: text/csv’);<br /> header(‘Content-Disposition: attachment; filename=”ramais.csv”‘);</p> <p> $saida = $stmt->fetchAll(PDO::FETCH_ASSOC);<br /> echo “id;nome;ramal;email;setor;diretor\r\n”;<br /> foreach ($saida as $s){<br /> foreach ($s as $k => $v){<br /> echo “{$v};”;<br /> }<br /> echo “\r\n”;<br /> } Popularity 6/10 Helpfulness 7/10 Language php Source: WorldLinkAnswers Tags: php Share Link to this answer Share Contributed on Mar 03 2020 Adventurous Anaconda 0 Answers Avg Quality 2/10