php - Import array to mysql table -


array (     [aed] => united arab emirates dirham     [afn] => afghan afghani     [all] => albanian lek     [amd] => armenian dram     [ang] => netherlands antillean guilder     [aoa] => angolan kwanza     [ars] => argentine peso     [aud] => australian dollar ) 

from json decode , want import mysql table like:

id \ code \ name 1  \  aed \ united arab emirates dirham 2  \  afn \ afghan afghani 

and on...

how can this?

use foreach:

foreach($thearray $key => $value) {   mysqli_query($link,"insert table(code,name) values (".$key.",".$value.")"); } 

Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -