how to echoing value but i want the row on it heading place
<p>I have a table like this.</p>

<p><a href="https://i.stack.imgur.com/9TRPa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9TRPa.png" alt="enter image description here"></a></p>

<p>but I want the data on the 'debit' column is on it own place. </p>

<p>this is what Iwant :</p>

<p><a href="https://i.stack.imgur.com/f5ZpY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/f5ZpY.png" alt="enter image description here"></a></p>

<p>this is my current code : </p>

<pre><code>&lt;?php
foreach ($jurnal-&gt;result_array() as $data){
    echo "
    &lt;tr&gt;
        &lt;td&gt;".$data['no_akun']."&lt;/td&gt;
        &lt;td&gt;".$data['nm_akun']."&lt;/td&gt;";
        if ($data['nm_akun'] == 'kredit'){
            echo "
                &lt;td&gt;&lt;/td&gt;
                &lt;td&gt;".$data['posisi_dr_cr']."&lt;/td&gt;
            ";

        }else{
            echo "
                &lt;td&gt;".$data['posisi_dr_cr']."&lt;/td&gt; 
                &lt;td&gt;&lt;/td&gt;
            ";
        }
    "&lt;/tr&gt;
    ";
}
?&gt;
</code></pre>