I want to put the contents of a csv file into a 2 dimensional array so that
I can access any element in a $table[x][y] manner and have come up with the
following code:
$complete = file("source.cs v");
$row=0;
foreach ($complete as $value) {
$data = explode(",", $value);
$table[$row] = $data;
$row++;
}
echo "$table[6][4]";
However the echo statement returns "Array[4]" instead of the 4th element in
the 6th row.
Any suggestions on what I ought to be doing please to make $table a proper 2
dimensional array?
I can access any element in a $table[x][y] manner and have come up with the
following code:
$complete = file("source.cs v");
$row=0;
foreach ($complete as $value) {
$data = explode(",", $value);
$table[$row] = $data;
$row++;
}
echo "$table[6][4]";
However the echo statement returns "Array[4]" instead of the 4th element in
the 6th row.
Any suggestions on what I ought to be doing please to make $table a proper 2
dimensional array?
Comment