Convert foreach to for in PHP
<pre><code>foreach ( $this-&gt;parent-&gt;get_sections(null, $this-&gt;parent-&gt;author) as $section)
{
  //...
}
</code></pre>

<p>I'm trying to do is force the loop to output each <code>$section</code> in the order I want. Each <code>$section</code>'s name can be retrieved by <code>$section-&gt;name</code>. Let's say that I want to output <code>$section</code> "Section 2" first and then "Section 1" (and not in the order of the <code>foreach</code>). How can I force it do that? I presume the proper way would be a <code>for</code> loop with an if checking section names each time.</p>
