$array = $fields = array();
$handle = @fopen("yourcsvfilename.csv", "r");
if($handle){
while(($row = fgetcsv($handle, 4096)) !== False){
if(empty($fields)){
$fields = $row;
continue;
}
foreach($row as $k=>$value){
$array[$i][$fields[$k]] = $value;
}
$i++;
}
if(!feof($handle)){
echo "Error: unexpected fgets() fail
";
}
fclose($handle);
}
print_r($array);