[eluser]Tim Brownlaw[/eluser]
Take a good look at the code and play spot the difference!
IN the new code - in the foreach - the array called $row is being created, adding a new entry on each pass.
$row[] = $value creates a new entry in the array called $row each time it's run.
As Tpojka stated, what you had wasn't creating an array but just a variable $this->data[‘productTag’] which is the same as saying $fred or the like... Just a plain ole variable... Not an array as you were expecting.
What you would have seen from your code is $this->data[‘productTag’] containing the very last entry from your foreach loop as it was getting over written each time!
When you get an error message stating that : Invalid argument supplied for foreach() means you need to g omaking sure what you're giving it is what it's wanting...
Performing things like var_dump($thing_i_want_to_check_out); and see what the structure and values are...
This just plain ole PHP stuff... Although arrays etc can be a little confusing at first.
Hopefully that makes it a lil clearer.
Cheers
Tim