-5
<?php 
$ex = array
(
    'Product' => array
        (
            '0' => array
                (
                    'item_id' => '1',
                    'product_name' => 'Paine',
                    'product_description' => 'Intermediala',
                    'product_price' => '2',
                    'product_weight' => '300',
                    'product_quantity' => '300',
                    'product_photos ' => '0',
                    'product_colors ' => '',
                ),

            '1' => array
                (
                  'item_id' => '2',
                    'product_name' => 'Apa',
                    'product_description' => 'plata',
                    'product_price' => '4',
                    'product_weight' => '4000',
                    'product_quantity' => '',
                    'product_photos' => '0',
                    'product_colors' => '',
                ),
            '2' => array
                (
                    'item_id' => '3',
                    'product_name' => 'Apa',
                    'product_description' => 'minerala',
                    'product_price' => '4',
                    'product_weight' => '4000',
                    'product_quantity' => '',
                    'product_photos' => '0',
                    'product_colors' => '',
                )   

        )
);



?>
4

1 回答 1

0
<table border="1"><?php
foreach ($ex['Product'] as $row) {
    echo '<tr>';
    echo '<td>'.$row['item_id'].'</td><td>'.$row['product_name'].'</td>';
    echo '</tr>';
}
?></table>
于 2012-05-25T07:39:28.407 回答