Array ( [0] => Array ( [No.,"Ticker","Company"] =>
1,"A","Agilent Technologies Inc." )
[1] => Array ( [No.,"Ticker","Company" ] =>
2,"AA","Alcoa, Inc.")
)
This is the output when i type print_r($arrayOne);
What can I do so I can only get the Company column i.e. Agilent Technologies Inc, and Alocoa, Inc.
I tried echo $arrayOne[‘Company’] and $arrayOne[0][‘Company’] but it just outputted ‘Array’.
What you have is an outer array with two sub-arrays, each of which has only one value. Its key is the description of the 3 columns, and its value is the CSV value. If you have PHP 5.3, use
str_getcsv()to parse it and return the third columnFor example with the input: