adding to a multi-dimensional array
Posted: Sat Apr 05, 2008 5:52 pm
Hi,
I want to be able to add to this array:
Currently when I add one patient and mutiple treatments to this array it outputs correctly: Array ( [2] => Array ( [0] => 4 [1] => 11 ) )
The problem is when I try to addadditional values i.e. in a loop, it does not store all values, just one.
How does one add to this collection of arrays?
I want to be able to add to this array:
Code: Select all
$patientTreatments=array($patientId=>$treatmentSelect);
The problem is when I try to addadditional values i.e. in a loop, it does not store all values, just one.
How does one add to this collection of arrays?