Output a Multidimensional Array with index and value and print into the table

suggest change
Array 
( 
    [0] => Array 
        ( 
            [id] => 13 
            [category_id] => 7 
            [name] => Leaving Of Liverpool 
            [description] => Leaving Of Liverpool 
            [price] => 1.00 
            [virtual] => 1 
            [active] => 1 
            [sort_order] => 13 
            [created] => 2007-06-24 14:08:03 
            [modified] => 2007-06-24 14:08:03 
            [image] => NONE 
        ) 

    [1] => Array 
        ( 
            [id] => 16 
            [category_id] => 7 
            [name] => Yellow Submarine 
            [description] => Yellow Submarine 
            [price] => 1.00 
            [virtual] => 1 
            [active] => 1 
            [sort_order] => 16 
            [created] => 2007-06-24 14:10:02 
            [modified] => 2007-06-24 14:10:02 
            [image] => NONE 
        ) 

)

Output Multidimensional Array with index and value in table

<table>
<?php 
foreach ($products as $key => $value) {
    foreach ($value as $k => $v) {
        echo "<tr>";
        echo "<td>$k</td>"; // Get index.
        echo "<td>$v</td>"; // Get value.
        echo "</tr>";
    }
}
?>
</table>

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents