Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

column of csv to array php

$csv = array_map("str_getcsv", file("data.csv", "r")); 
$header = array_shift($csv); 
// Seperate the header from data

$col = array_search("Value", $header); 
 foreach ($csv as $row) {      
 $array[] = $row[$col]; 
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #column #csv #array #php
ADD COMMENT
Topic
Name
7+2 =