excel - Call a single cell from a .CSV using PHP -


I have a problem importing a single cell in CSV, I have a CSV file containing 7 columns and ~ 1420 lines, I need to read only 4 column numbers in the row of 1420, how can I do this?

  & lt ;? Php $ url = "wp-admin / ftp / test.csv"; $ CsvData = file_get_contents ($ url); $ Rows = explosion ("\ n", $ csvData); $ Array = array (); Forex currency ($ line as line $) {$ array [] = str_getcsv ($ line); } Acres $ array [1]; ? & Gt;   

With this I have output with all the cells in a row, but I have to take the third number in that line, and not all of it.

I believe the $ array is multidimensional What you should print the following:

  echo $ array [1419] [3];   

Otherwise you can print it to print how it is structured:

  print_r ($ array);   

update: only

  foreach ($ lines as line $) {$ array [] = str_getcsv ($ line) [3]; // PHP 5.4} Acres $ array [1419];    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -