I have a CSV file that contains books, the columns in it are:
book_id,name, date_published

I need to put this data into an HTML table using PHP, then use javascript to add a search function, that makes it so that if the rows match with the input only then will the table be visible?
I'm completely stumped and would appreciate an easy understanding of the solution!
well I tried to import the CSV file in PHP but I can't seem to get it into an array I tried other methods some got me to the javas cript bit but nothing successful
You can open your CSV file and display it in a table as follows:
<?php
// Open the CSV file
$fcsv = fopen( 'filename.csv', 'r' );
// Get header row
$row = fgetcsv( $fcsv );
// Output start of table & header row
?>
<table>
<thead>
<tr>
<td><?= $row[0] ?></td>
<td><?= $row[1] ?></td>
<td><?= $row[2] ?></td>
<td><?= $row[3] ?></td>
<td><?= $row[4] ?></td>
<td><?= $row[5] ?></td>
<td><?= $row[6] ?></td>
</tr>
</thead>
<tbody>
<?php
// Loop through rest of rows in CSV
while ( ( $row = fgetcsv( $fcsv ) ) !== false )
{
?>
<tr>
<td><?= $row[0] ?></td>
<td><?= $row[1] ?></td>
<td><?= $row[2] ?></td>
<td><?= $row[3] ?></td>
<td><?= $row[4] ?></td>
<td><?= $row[5] ?></td>
<td><?= $row[6] ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
For the Javascript filtering, you should look at the DataTables JavaScript plugin... it's very simple to set up (see examples on the website) and can search, order & filter data in a variety of ways depending on your needs.