Click here to Skip to main content
15,921,716 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to create three table in a row in my page & put these values in, I try to remove each value after echoing them but i cant remove the value of $Column[$key] i used three way but they don't work. now my question is why? and how can i do that?
Is there any better way?
PHP
<?php
$i = 0;
while(count($TBClm)>0)
{?>
    <div class="col-25p">
        <table>
            <tbody>
            <?php
            $j = 0;
            foreach ($TBClm as $Ctg => $Column)
            {
                ++$j;
                ?>
                <tr class="category">
                    <td>-<?php echo $Ctg;?>-</td>
                </tr>
                <?php
                foreach ($Column as $key => $values)
                {
                    if($Column[$key]==null)
                       continue;

                    ++$j;
                    ?>
                    <tr>
<td>
<?echo $values[0];?>
<td>
</tr>
                <?php

                    $Column[$key]=null;//actually i want to remove this part
//I used unset() and array_shift() but they didn't work 

                    if ($j > 10)
                        break;
                }
                if ($j > 10)
                    break;

                unset($TBClm[$Ctg]);
            }?>
            </tbody>
        </table>
    </div>
<?php
}?>
Posted
Updated 31-May-15 19:47pm
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900