title: Make tabular Data downloadable as a CSV file
body: <p>I have a website which offers data in standard HTML table form and is displayed across 7 columns. At the backend, data is stored in MySQL and displayed through PHP on the webpage.</p>
  <p>Site visitors have been demanding that data be made available for download in a CSV file, and I am OK to offer that feature.</p>
  <p>What is the best way to offer a limited number of columns (say 3 out of 7 columns) with a one-click download into CSV file?</p>
  <p><em>Note: this question is <strong>NOT</strong> about site visitors <strong>scraping</strong> data using python or other scripts, but it is about a webmaster willingly offering the option to download data in a CSV file.</em></p>
  <p><em>Searched for and checked this thread <a href="https://stackoverflow.com/questions/5881243/xml-or-csv-for-tabular-data">XML or CSV for &quot;Tabular Data&quot;</a>, but it does not have a precise answer, hence the question.</em></p>