<?php
//getting the data out of the csv file
$file = 'var/import/[login to view URL]';
$content = file($file);
$csvData = array();
for($i = 1; $i < count($content); $i++) {
$line = explode(' ', $content[$i]); //explode the delimiter
for($j = 0; $j < count($line); $j++) {
$csvData[$i][$j + 1] = $line[$j];
}
}
?>
With $csvData[int] we get the whole line of data.
With $csvData[int][int] we get a specific column from the whole line of data.
We need you to extend this script. We need to search for a value in Column 1.
When there is a match, it should show the line $svData[int].
Hello
Please don't use "file" (PHP function) to read csv files. Please use fopen and fgetcsv. I have this code implemented already. Please share your site details. So that I can resolve the problem.
Thanks
Config Technolabs