how to change values between loop
<p>I extracted the values of the array on the foreach loop, but I want when it retrieves a certain <code>'br_title'</code> changed href link to <code>&lt;a href="http://noorresults.moe.sa</code>..how to do that with simple code?..</p>

<pre><code>          &lt;ul class="riMenu"&gt;
            &lt;?php foreach ($last_branches as $last) { ?&gt;
          &lt;li&gt;&lt;a href="&lt;?= base_url(); ?&gt;branches/show/&lt;?php if (!empty($last['br_id'])) echo $last['br_id'] ?&gt;"&gt; &lt;?php if (!empty($last['br_title'])) echo $last['br_title'] ?&gt;&lt;/a&gt;&lt;/li&gt;

    &lt;?php }; ?&gt;
        &lt;/ul&gt;


    &lt;/div&gt;
&lt;/div&gt;&lt;!-- Menu E
</code></pre>
