Hi all,
I am using a for statement to generate lots of arrays, example:
Array
(
[0] => 2
[1] => 395.0
[2] => 0.33
)
Array
(
[0] => 3
[1] => 394.0
[2] => 0.81
)
But, I want to have them all within 1 array, example:
Array
(
[0]
(
[0] => 2
[1] => 395.0
[2] => 0.33
)
[1]
(
[0] => 3
[1] => 394.0
[2] => 0.81
)
)
Am I able to do this within my for statement, which is currently:
for ($c=0; $c < $num; $c++)
{
echo '<pre>';
print_r(str_getcsv($data[$c], ' '));
echo '</pre>';
}
My research online has just turned up merging or adding to arrays, not adding arrays as a seperate level like I want to here... Can anyone help?