Hi Everyone
Struggling with something that should be incredibly simple
I need to search through a csv file for a certain string and then return the rows which contain that string and only certain columns for that row
So I have the simple part to display only the relevant columns but I cant find any info on how to search and only return the relevant rows? Your assistance would be highly appreciated.
<?php
if (($handle = fopen("filename.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
echo "$data[1] $data[2] $data[3] $data[18] $data[34] <br />\n";
}
fclose($handle);
}
?>