Displaying a CSV file as an HTML table in a CRUD page
The biggest problem with this code is not so much the CSV formatting, but the fact that you have a "Delete" link like this:

&lt;a class="btn btn-danger" href="actions/delete_band.php?linenum=$i"&gt;

The fact that a deletion can be triggered by an HTTP GET request exposes you to a Spider of Doom situation:


  Things went pretty well for a few days after going live. But, on day six, things went not-so-well: all of the content on the website had completely vanished and all pages led to the default "please enter content" page. […]
  
  A user [had] copied and pasted some content from one page to another, including an "edit" hyperlink to edit the content on the page. Normally, this wouldn't be an issue, since an outside user would need to enter a name and password. But, the CMS authentication subsystem didn't take into account the sophisticated hacking techniques of Google's spider. Whoops.


Moreover, GET requests are generally cacheable, so clicking on the link might not reliably cause the row to be deleted.

For requests that trigger a state change on the server, what you want is an HTTP POST.  POSTs are not cacheable, and will not be triggered by web crawlers.  To change the link to perform a POST, you could either make it a button in a form or do something using JavaScript.