How to edit the code so that the results are as we expected?
<p>My code is like this :</p>

<pre><code>&lt;?php

    function romanic_number($integer, $upcase = true) 
    { 
        $table = array('M'=&gt;1000, 'CM'=&gt;900, 'D'=&gt;500, 'CD'=&gt;400, 'C'=&gt;100, 'XC'=&gt;90, 'L'=&gt;50, 'XL'=&gt;40, 'X'=&gt;10, 'IX'=&gt;9, 'V'=&gt;5, 'IV'=&gt;4, 'I'=&gt;1); 
        $return = ''; 
        while($integer &gt; 0) 
        { 
            foreach($table as $rom=&gt;$arb) 
            { 
                if($integer &gt;= $arb) 
                { 
                    $integer -= $arb; 
                    $return .= $rom; 
                    break; 
                } 
            } 
        } 

        return $return; 
    } 

    $testArray = array(
            array(
                'display'   =&gt; '1', // strlen = 1 =&gt; it's Continent
                'uraian'    =&gt; 'European Continent',
            ),
            array(
                'display'   =&gt; '114', // strlen = 3 =&gt; it's Country
                'uraian'    =&gt; 'England Country',
            ),
            array(
                'display'   =&gt; '1141444', // strlen = 7 =&gt; it's City 
                'uraian'    =&gt; 'London City',
            ),
            array(
                'display'   =&gt; '1141445', 
                'uraian'    =&gt; 'Manchester City',
            ),
            array(
                'display'   =&gt; '1141452', 
                'uraian'    =&gt; 'Liverpool City',
            ),
            array(
                'display'   =&gt; '1141454', 
                'uraian'    =&gt; 'Oxford City',
            ),
            array(
                'display'   =&gt; '115', 
                'uraian'    =&gt; 'Spain Country',
            ),
            array(
                'display'   =&gt; '1151464', 
                'uraian'    =&gt; 'Madrid City',
            ),
            array(
                'display'   =&gt; '1151465', 
                'uraian'    =&gt; 'Barcelona City',
            ),
            array(
                'display'   =&gt; '2', 
                'uraian'    =&gt; 'Asian Continent',
            ),
            array(
                'display'   =&gt; '215', 
                'uraian'    =&gt; 'Japan Country',
            ),
            array(
                'display'   =&gt; '2151474', 
                'uraian'    =&gt; 'Tokyo City',
            ),
            array(
                'display'   =&gt; '2151475', 
                'uraian'    =&gt; 'Osaka City',
            )
        );

    echo '&lt;table border=1&gt;
            &lt;tr&gt;
                &lt;th&gt;No&lt;/th&gt;
                &lt;th&gt;Description&lt;/th&gt;
            &lt;/tr&gt;';
    $i = 1;
    $j = 'A';
    foreach($testArray as $key)
    {
        echo '&lt;tr&gt;
                &lt;td&gt;';
                    if(strlen($key['display'])==3)
                    {
                        echo romanic_number($i);
                        ++$i;
                    }
                    if(strlen($key['display'])==7)
                    {
                        echo $j;
                        ++$j;
                    }
        echo   '&lt;/td&gt;
                &lt;td&gt;';
                    echo $key['uraian'];
        echo    '&lt;/td&gt;
             &lt;/tr&gt;';
    }
    echo '&lt;/table&gt;';

?&gt;
</code></pre>

<p>The result is like this : <a href="http://postimg.org/image/9jmn7mlr1/" rel="nofollow noreferrer">http://postimg.org/image/9jmn7mlr1/</a></p>

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

<p>I want the result not like that, but like this:</p>

<p><a href="https://postimg.org/image/579p02c1p/" rel="nofollow noreferrer">https://postimg.org/image/579p02c1p/</a></p>

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

<p>I had try to edit the code, but i'm still can't do it.</p>

<p>Is there any people who can help me?</p>