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
Post a Comment