Minggu, 06 Oktober 2013

PHP Indonesia - Facebook: [ask]gan,gimna cara insert array assosiative ke da...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
[ask]gan,gimna cara insert array assosiative ke da...
Oct 6th 2013, 14:47, by Rere Saputra

Rere Saputra 2:47pm Oct 6
[ask]gan,gimna cara insert array assosiative ke dalam database?
mis:
$data = array("sma 1" => 36, "sma 5" => 56, "sma 8" => 16 );
gimana insert data trsbut sprti dibawah:
insert into sekolah values (nama,nilai) values ('sma 1','36');
insert into sekolah values (nama,nilai) values ('sma 5','56');
insert into sekolah values (nama,nilai) values ('sma 8','16');
mohon pencerahan :3

Ando Poluan 2:52pm Oct 6
Foreach($data as $key => $val){
mysql_query("insert into sekolah(nama,nilai) values ('$key','$val')");

}

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar