I am trying to remove duplicate values from $headout, but when I var_dump it I get the duplicate values. Not sure why this is happening.
<?php
$in = fopen("./converted_files/corrected_with_options_msrp.txt", "r");
$out = fopen("./converted_files/EPA_options.txt", "w");
while(($line = fgetcsv($in, 0, '|')) !== false)
{
$headout = array($line[8]);
$headout2 = array($line[9]);
$output = array_unique($headout);
}
fclose($in);
fclose($out);
?>