Foreach Not Working :/

Hi all, I’m trying to use a foreach to run through an array but it’s not doing anything. It’s just echo array().

The below is what is produced from using print_r:

Array ( [0] => Array ( [0] =>
Canon EOS 1000D Digital SLR [1] =>
Canon EOS 1000D + EFS 18-55mm F3.5/5.6 [2] =>
Canon EOS 1100D Digital SLR [3] =>
Canon EOS 500D Digital SLR [4] =>
Canon EOS 500D + EFS 18-55mm F3.5/5.6 IS [5] =>
Canon EOS 550D Digital SLR [6] =>
Canon EOS 550D + EFS 18-55mm F3.5/5.6 IS [7] =>
Canon EOS 550D + EFS 18-135mm F3.5/5.6 IS [8] =>
Canon EOS 600D Digital SLR [9] =>
Canon EOS 60D + EFS 17-55mm F2.8 IS [10] =>
Canon EOS 60D Digital SLR [11] =>
Canon EOS 60D + EFS 17-85mm F4/5.6 IS [12] =>
Canon EOS 60D + EFS 18-55mm F3.5/5.6 IS [13] =>
Canon EOS 60D + EFS 18-135mm F3.5/5.6 IS [14] =>
Canon EOS 7D Digital SLR [15] =>
Canon EOS 7D + EFS 15-85mm F3.5/5.6 IS [16] =>
Canon EOS 7D + 18-135mm F3.5/5.6 IS [17] =>
Canon EOS 5D MKII Digital SLR [18] =>
Canon EOS 5D MKII + EF 24-105mm F4 L IS [19] =>
Canon EOS 1D MKIV Digital SLR [20] =>
Canon EOS 1DS MKIII Digital SLR ) ) 

The foreach statement looks like:

foreach ($matches as $key=>$value){
	echo $value;
}

What am I doing wrong?? :lol:

That’s an array inside an array - where are you getting the data from?

If it’s always going to be in that format, then using $matches[0] should work.

Hey dude, that sure did it, all working perfectly now. Thanks for your time :smiley: