How to manipulate field with Number of value "unlimited" through php I've got a field image with unlimited number of value and a view who shows 12 of them from different node(in this case I can not use delta).
Now instead of showing the 8th and the 11th pictures I want to show a blank box with text.

I would like to insert this loop so I installed view PHP and I wrote this code on the box "Output code"

$counter = 0;
foreach ($row-&gt;field_image as $image){
  if ($counter++ = 8){
  echo "something";
continue;
}
  if ($counter++ = 11){
  echo "something else";
continue;
}
print $images;
}


What am i doing wrong?
How can I get the result I want?
Thanks in advance
Those if($counter++ = 8) lines look whacky to me.

don't you mean:

$counter++;
if( $counter == 8 ) {
  /* do stuff */
}


checking for equality is == or === not =