theme_preprocess_views_view_fields() function in drupal7 does not accept static variable as index
Static vars aren't special beyond persisting inside the scope of the function they were created, for the duration of a single page build. You categorically can use a static var as an array index.

Take the following code:

function some_test(&amp;$variables) {
  static $i = 0;
  print $variables[$i];
  $i++;
}

$variables = array(
  0 =&gt; 'test1',
  1 =&gt; 'test2',
);

some_test($variables);
some_test($variables);


Which outputs the following:

test1
test2


Proving that $variables[$i] is accessed as expected.

The problem with you code must be somewhere else, as it's not being caused by a language issue as you suggest.

At a wild guess, $variables['view']-&gt;result isn't keyed in the same way you expect it to be (possibly keyed by the result's base table ID instead of a zero-based list). Dumping out $variables['view']-&gt;result should tell you pretty quickly what's happening.