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/ | |
 | Mobile Game Development Course
Learn how to create awesome HTML5 games that run on iPhone, iPad, Android and Desktop! Sign up today for this $99 online course.  | From our sponsors | | |
[ASK][LOOPING][VARIABEL] Selamat sore programmer I... Aug 23rd 2013, 08:01, by Rizky Muhammad | [ASK][LOOPING][VARIABEL] Selamat sore programmer INDONESIA. Mau tanya saya melakukan pengulangan FOR. Di dalam for membuat variabel baru misalkan yang misalkan bernama $a1, $a2, lalu didalam for itu ada if condition yang menggunakan variabel baru tersebut. tapi gagal. for($a=1;$a<=3;$a++){ if(!empty($tb_istri."_".$a['nama_istri'])){ <<<--- Disini Error echo "Kosong"; } } |
| | lha $a kan bukan array, tapi skalar dengan nilainya bertipe integer dari 1 s.d 3, kok bisa-bisanya ada $a['nama_istri'] itu istri siapa gan? ... masih belum ngeh ..maklum ane nubi ^_^V |
| | iya pak bener array, jadinya gini sebenarnya sebelum if conditional itu ada syntax seperti ini : $tb_istri."_".$a=mysql_fetch_array(mysql_query("select * from tb_istri")); nah setelah itu baru saya memasang if nya pak. |
| | setau ane sih contoh codingnya salah.. | | |
|
Tidak ada komentar:
Posting Komentar