Reputation: 5747
I am running a for loop and attempting to enter data into an array.
When I run the print_r of the array, it's as if the for loop is only running once when it should be running multiple times!
for($i=0; $i<count($count); $i++){
$currentField = $array[$i];
$test = "".$field."[".$i."]";
$this->_postData[$test] = $currentField;
$this->_currentItems[$i] = $test;
}
print_r($this->_currentItems);
die();
If I echo $count before, it says 3 (for example) but still when I print the array, it only has 1 value! Any ideas?
Thanks.
Upvotes: 0
Views: 50