Jump to content

blight

New Members
  • Posts

    2
  • Joined

  • Last visited

blight's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi Barand Thanks - but I cant figure out the syntax to combine the if statement and the fgetcsv function...
  2. 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); } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.