Ok, I got this far...
If I enter a number not found in the CSV, it displays
lostlostlost
Lost.
If I enter a number found in the CSV, anywhere not the row it is supposed to (6 aka Jul), it doesnt say lost or found.
Here is the csv layout
Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec
"2,400","6,500","17,950","40,000","72,650","115,900","169,750","234,200","309,250","394,900","491,150","598,000"
850,850,"11,450","22,050","32,650","43,250","53,850","64,450","75,050","85,650","96,250","106,850"
"3,250","10,600","10,600","10,600","10,600","10,600","10,600","10,600","10,600","10,600","10,600","10,600"
Here is the PHP
$file = "test.csv";
//pull for jul
$column = 6;
$handle = fopen($file, 'r');
while (($row = fgetcsv($handle, 1000, ",")) !== false)
{
if ($row[$column] == $product_id)
{
echo "found";
$msg = "Found.";
} else{
echo "lost";
$msg = "Lost.";
}
}
}
Thanks!