Please consider the following PHP:
function get_ship_class()
{
$csv = array_map("str_getcsv", file("somefile.csv", "r"));
$header = array_shift($csv);
// Seperate the header from data
$col = array_search("heavy_shipping_class", $header);
foreach ($csv as $row)
{
$array[] = $row[$col];
}
}
How do I pass the resulting array from the above function into
if( in_array() ){
//code
}
?