title: Replacing "foreach" with "for" in PHP
body: <p>I need to replace my "foreach" with "for", but actually I don't know how. 
  Here is the part of my php code:   </p>
  
  <pre><code>$r = "";
  $j = 0;
  foreach ($orgs as $k =&gt; $v) {
      echo "\n\r" . $v-&gt;id . "\n\r";
      if (1) {
          $a_view_modl = ArticleView :: model($v-&gt;id, $v-&gt;id);
          $connection = $a_view_modl-&gt;getDbConnection();
  </code></pre>
  
  <p>Thanks!</p>