I am brand spanking new to PHP so bear with me...
Starting with the code...
<?php
$file_handle = fopen("web_contacts.csv", "r");
while (!feof($file_handle) ) {
$array13 = fgetcsv($file_handle, 1024);
print_r($array13);
}
fclose($file_handle);
?>
I am pulling rows into the array $array13 from a CSV sheet.
I'm getting this (abbreviated)...
Array
(
[0] => Rafael Z
[1] => PASC
[2] => Chairperson
[3] => ascchair@peninsulana.org
)
Array
(
[0] => Nick A
[1] => PASC
[2] => Vice Chairperson
[3] => ascvicechair@peninsulana.org
)
Array
(
[0] => OPEN
[1] => PASC
[2] => Tresurer
[3] => asctreasurer@peninsulana.org
What I want is...
Array [0]
(
[0] => Rafael Z
[1] => PASC
[2] => Chairperson
[3] => ascchair@peninsulana.org
)
Array [1]
(
[0] => Nick A
[1] => PASC
[2] => Vice Chairperson
[3] => ascvicechair@peninsulana.org
)
Array [2]
(
[0] => OPEN
[1] => PASC
[2] => Tresurer
[3] => asctreasurer@peninsulana.org
)
Basically I want each pass of the while (or foreach if that is what should be used) to assign a key value to the array
i.e. $array13[1][2] == "Vice Chairperson"
I have been all over the forum and tried dozens of things. Ready to shoot myself.
HELP!!