mysql içine php dizi eklemek

0 Cevap php

Ben bir dizi $ product_array var, ve ben print_r ($ product_array) kullandığınızda;. Dizi bu gibi gösterir

Array
(
    [0] => Array
        (
            [ID] => P00100
            [NAME] => Edina
            [PRICE] => $20.00
        )

    [1] => Array
        (
            [ID] => P00101
            [NAME] => Richfield
            [PRICE] => $21.00
        )

    [2] => Array
        (
            [ID] => P00102
            [NAME] => Bloomington
            [PRICE] => $22.00
        )
)

I set my database table in 4 columes, first one is mainid, and which is auto increment, following with ID, NAME, PRICE, as the keys showed above. I would like to insert this array $product_array into mysql. Can anyone help? Would be very much appreciated! tks.

0 Cevap