SlideShare a Scribd company logo
1 of 25
Web Programming– PHP PHP Hypertext Preprocessor Pemrograman Web (2010/2011) Teknik Informatika, Universitas Islam Indonesia Follow  Hari Setiaji  on Twitter
Sekilas Pemograman Web (2010/2011) – Hari Setiaji, S.Kom ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Alur Kerja PHP Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
Contoh Penyisipan Script PHP ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],<html> halo 1<br> halo 2<br> halo 3</html> PHP HTML Browser Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
Variabel & Konstanta  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
Operator ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
Examples <?php echo &quot;<h3>Postincrement</h3>&quot;; $a = 5; echo &quot;Should be 5: &quot; . $a++ . &quot;<br />&quot;; echo &quot;Should be 6: &quot; . $a . &quot;<br />&quot;; echo &quot;<h3>Preincrement</h3>&quot;; $a = 5; echo &quot;Should be 6: &quot; . ++$a . &quot;<br />&quot;; echo &quot;Should be 6: &quot; . $a . &quot;<br />&quot;; echo &quot;<h3>Postdecrement</h3>&quot;; $a = 5; echo &quot;Should be 5: &quot; . $a-- . &quot;<br />&quot;; echo &quot;Should be 4: &quot; . $a . &quot;<br />&quot;; echo &quot;<h3>Predecrement</h3>&quot;; $a = 5; echo &quot;Should be 4: &quot; . --$a . &quot;<br />&quot;; echo &quot;Should be 4: &quot; . $a . &quot;<br />&quot;; ?> PHP Browser Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
Examples <?php $a=5; $b=&quot;5&quot;; $hasil = $a==$b; echo &quot;$hasil <br />&quot;; $a=5; $c=5; $hasil = $a===$c; echo &quot;$hasil <br />&quot;; $jenis = ($a % 2 == 0 ? Genap : Ganjil); echo $a.&quot; adalah bilangan $jenis&quot;; ?> PHP Browser Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
Konstruksi dasar program PHP ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
Examples <?php // Konstruksi If $bulan=date(&quot;m&quot;); if ($bulan==4)  echo &quot;Bulan April&quot;; // Konstruksi If .. Else echo &quot;<br />&quot;; $today=date(&quot;w&quot;); if ($today==1)  echo &quot;Hari Senin&quot;; else  echo &quot;Bukan Hari Senin &quot;; // Konstruksi If .. Elseif.. Else echo &quot;<br />&quot;; $today=date(&quot;w&quot;); if ($today==1)  echo &quot;Hari Senin&quot;; elseif ($today==2) echo &quot;Hari Selasa&quot;; else  echo &quot;Bukan Hari Senin atau hari selasa &quot;; ?> PHP Browser Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
Examples <?php $today=date(&quot;l&quot;); switch ($today) { case &quot;Sunday&quot; : echo &quot;Hari Minggu&quot;; break; case &quot;Monday&quot; : echo &quot;Hari Senin&quot;; break; case &quot;Tuesday&quot; : echo &quot;Hari Selasa&quot;; break; case &quot;Wednesday&quot; : echo &quot;Hari Rabu&quot;; break; default : echo &quot;Hari Sabtu&quot;; } ?> PHP Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
Examples Hasil While <br /> <?php $bilangan =1; while ($bilangan <= 25) { echo $bilangan.&quot; &quot;; $bilangan++; } echo &quot;<br /><br />&quot;; ?> Hasil Do..While <br /> <?php $a=10; do { echo $a.&quot; &quot;; $a--; }  while ($a > 5); ?> <br /><br /><b>Hasil For</b> <br /> <?php for ($i=1;$i<=6;$i++) { echo &quot;<h&quot;.$i.&quot;>Header $i </h&quot;.$i.&quot;>&quot;; } ?>  Browser PHP Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
Examples <b>Penggunaan Continue</b> <br /> <?php for ($i=1;$i<=15;$i++) { if ($i >5 && $i<=11)    continue; echo $i.&quot;<br /> &quot;; } ?> PHP Browser Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
Array ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
Examples <?php //Pembuatan Array cara I $mahasiswa = array (&quot;Dani&quot;,&quot;Andini&quot;,&quot;Sheila&quot;,&quot;Rudi&quot;); //Pembuatan Array cara II $mahasiswa[] = &quot;Dani&quot;; $mahasiswa[] = &quot;Andini&quot;; $mahasiswa[] = &quot;Sheila&quot;; $mahasiswa[] = &quot;Rudi&quot;; //Pembuatan Array dengan indeks yang tidak terurut $musik=array (&quot;Jazz&quot;,5=>&quot;Blues&quot;,&quot;Rock&quot;,10=>&quot;Dankdut&quot;); //Pengaksesan Array mahasiswa echo &quot;Elemen Array mahasiswa pertama adalah : $mahasiswa[0] <br />&quot;; echo &quot;Elemen Array mahasiswa ketiga adalah : $mahasiswa[2] <br />&quot;; //Pengaksesan Array musik echo &quot;Elemen Array musik pertama adalah : $musik[0] <br />&quot;; echo &quot;Elemen Array musik ketiga adalah : $musik[6] <br />&quot;; echo &quot;Elemen Array musik keempat adalah : $musik[10] <br />&quot;; ?> PHP Browser
Examples <?php //Pembuatan Array dengan indeks string $hari=array (&quot;Sunday&quot;=>&quot;Minggu&quot;,   &quot;Monday&quot;=>&quot;Senin&quot;,   &quot;Tuesday&quot;=>&quot;Selasa&quot;,   &quot;Wednesday&quot;=>&quot;Rabu&quot;,   &quot;Thursday&quot;=>&quot;Kamis&quot;,   &quot;Friday&quot;=>&quot;Jumat&quot;,   &quot;Saturday&quot;=>&quot;Sabtu&quot;   ); echo &quot;jumlah elemen Array : &quot;.count($hari).&quot;<br />&quot;; $hari_inggris=date(&quot;l&quot;); echo &quot;Hari ini adalah hari $hari[$hari_inggris]&quot;; ?> PHP Browser Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
Examples <?php //Array Multidimensi $peserta = array ( &quot;PHP&quot; => array(&quot;Anto&quot;,&quot;Dani&quot;,&quot;Rendra&quot;,&quot;Lani&quot;), &quot;MySQL&quot; => array(&quot;Bayu&quot;,&quot;Lina&quot;,&quot;Diana&quot;,&quot;Rinto&quot;), &quot;Delphi&quot; => array(&quot;Doni&quot;,&quot;Dini&quot;,&quot;Ela&quot;,&quot;Aryo&quot;), &quot;JSP&quot; => array(&quot;Fia&quot;,&quot;Rina&quot;,&quot;Roni&quot;,&quot;Dian&quot;)); //Pengaksesan dengan While while (list($indeks_1, $nilai_1) = each($peserta)) { echo &quot;<b>Peserta $indeks_1 </b>: <br />&quot;; $nomor=1; while (list($indeks_2,$nilai_2) = each($nilai_1)) { echo $nomor.&quot;.&quot;.$nilai_2.&quot;<br />&quot;; $nomor++; } } Browser PHP Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
Examples <?php //Array Multidimensi $peserta = array ( &quot;PHP&quot; => array(&quot;Anto&quot;,&quot;Dani&quot;,&quot;Rendra&quot;,&quot;Lani&quot;), &quot;MySQL&quot; => array(&quot;Bayu&quot;,&quot;Lina&quot;,&quot;Diana&quot;,&quot;Rinto&quot;), &quot;Delphi&quot; => array(&quot;Doni&quot;,&quot;Dini&quot;,&quot;Ela&quot;,&quot;Aryo&quot;), &quot;JSP&quot; => array(&quot;Fia&quot;,&quot;Rina&quot;,&quot;Roni&quot;,&quot;Dian&quot;)); //Pengaksesan dengan Foreach foreach ($peserta as $indeks_1 => $nilai_1) { echo “<b>Peserta $indeks_1 </b>: <br />&quot;; $nomor=1; foreach ($nilai_1 as $indeks_2 => $nilai_2) {   echo $nomor.&quot;.&quot;.$nilai_2.&quot;<br />&quot;;   $nomor++; } } ?> Browser PHP Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
PHP pada pemrograman web ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
PHP pada pemrograman web ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
Input dari Parameter URL ,[object Object],[object Object],<? $aksi =  $_GET [&quot; act &quot;]; $id =  $_GET [&quot; id &quot;]; if ($aksi == &quot;edit&quot;) { //lakukan edit terhadap data dengan ID = $id } else if ($aksi == &quot;Delete&quot;) { //lakukan delete terhadap data dengan ID = $id } ?> <html> 1. Jaket <a href='go.php? id = 1 & act = edit '>Edit</a> <a href='go.php? id = 1 & act = delete '>Delete</a><br> 2. Sepatu <a href='go.php? id = 2 & act = edit '>Edit</a> <a href='go.php? id = 2 & act = delete '>Delete</a> </html> HTML Browser PHP:  go.php
Input dari Form HTML ,[object Object],<? $nama =  $_POST [&quot; nama &quot;];  //berisi string nama $jenis =  $_POST [&quot; jenis &quot;];  //berisi &quot;L&quot; atau &quot;P&quot; //simpan data $nama dan $jenis ?> <html> <form action='save.php' method=' POST '> Nama<br> <input type='text' name=' nama '><br> Jenis<br> <input type='radio' name=' jenis ' value=' L '>Laki-laki<br> <input type='radio' name=' jenis ' value=' P '>Perempuan<br> <input type='submit' value='Simpan'> </form> </html> HTML Browser PHP:  save.php
Input dari Cookie ,[object Object],<html> <form action='login.php' method='POST'> User <input type='text' name=' user '><br> Password <input type=‘password' name='pass'><br> <input type='submit' value='Login'> </form> </html> Browser <? $user =  $_COOKIE [&quot; login &quot;];  //berisi string username if ($user == &quot;&quot;) {  //belum melakukan login header(&quot;Location: login.html&quot;);  //redirect ke halaman login } else { // User sudah login, boleh melakukan sesuatu } ?> PHP:  anypage.php <? $user = $_POST[&quot; user &quot;];  //berisi string username $pass = $_POST[&quot;pass&quot;];  //berisi string password if ( )) { //simpan $user di cookie setcookie (&quot; login &quot;, $user); } ?> PHP:  login.php HTML:  login.html
Input dari Session ,[object Object],<html> <form action=‘anypage.php' method='POST'> User <input type='text' name=' user '><br> Password <input type='text' name='pass'><br> <input type='submit' value='Login'> </form> </html> HTML:  login.html Browser <? Include (“login.php”); $user =  $_SESSION [&quot; login &quot;];  //berisi string username if ($user == &quot;&quot;) {  //belum melakukan login header(&quot;Location: login.html&quot;);  //redirect ke halaman login } else { // User sudah login, boleh melakukan sesuatu } ?> PHP:  anypage.php <? $user = $_POST[&quot; user &quot;];  //berisi string username $pass = $_POST[&quot;pass&quot;];  //berisi string password if (cekPass($user, $pass)) { //simpan $user di session session_start(); $_SESSION [&quot; login &quot;] = $user; } ?> PHP:  login.php
Finally Pemograman Web (2010/2011) – Hari Setiaji, S.Kom

More Related Content

More from Hari Setiaji

Project Management Tools
Project Management ToolsProject Management Tools
Project Management ToolsHari Setiaji
 
Database Jaman Now
Database Jaman NowDatabase Jaman Now
Database Jaman NowHari Setiaji
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajaxHari Setiaji
 
Web Programming - Javascript
Web Programming - JavascriptWeb Programming - Javascript
Web Programming - JavascriptHari Setiaji
 
Tutorial Postgre SQL
Tutorial Postgre SQLTutorial Postgre SQL
Tutorial Postgre SQLHari Setiaji
 
DTD - Atribut dan Entities
DTD - Atribut dan EntitiesDTD - Atribut dan Entities
DTD - Atribut dan EntitiesHari Setiaji
 
Teknologi XML - Pengenalan DTD
Teknologi XML - Pengenalan DTDTeknologi XML - Pengenalan DTD
Teknologi XML - Pengenalan DTDHari Setiaji
 
Teknologi XML - Pengenalan Tree
Teknologi XML - Pengenalan TreeTeknologi XML - Pengenalan Tree
Teknologi XML - Pengenalan TreeHari Setiaji
 
Bab II Use Case Diagram
Bab II Use Case DiagramBab II Use Case Diagram
Bab II Use Case DiagramHari Setiaji
 
Native Xml Tutorial
Native Xml TutorialNative Xml Tutorial
Native Xml TutorialHari Setiaji
 
Persentasi Ajax Native Xml
Persentasi Ajax Native XmlPersentasi Ajax Native Xml
Persentasi Ajax Native XmlHari Setiaji
 
Distributed Database Using Oracle
Distributed Database Using OracleDistributed Database Using Oracle
Distributed Database Using OracleHari Setiaji
 

More from Hari Setiaji (17)

Project Management Tools
Project Management ToolsProject Management Tools
Project Management Tools
 
Database Jaman Now
Database Jaman NowDatabase Jaman Now
Database Jaman Now
 
Introduction to ajax
Introduction to ajaxIntroduction to ajax
Introduction to ajax
 
Web Programming - Javascript
Web Programming - JavascriptWeb Programming - Javascript
Web Programming - Javascript
 
Tutorial Postgre SQL
Tutorial Postgre SQLTutorial Postgre SQL
Tutorial Postgre SQL
 
DTD - Atribut dan Entities
DTD - Atribut dan EntitiesDTD - Atribut dan Entities
DTD - Atribut dan Entities
 
Teknologi XML - Pengenalan DTD
Teknologi XML - Pengenalan DTDTeknologi XML - Pengenalan DTD
Teknologi XML - Pengenalan DTD
 
Teknologi XML - Pengenalan Tree
Teknologi XML - Pengenalan TreeTeknologi XML - Pengenalan Tree
Teknologi XML - Pengenalan Tree
 
HTML - Form
HTML - FormHTML - Form
HTML - Form
 
HTML Dasar
HTML DasarHTML Dasar
HTML Dasar
 
Pengenalan XML
Pengenalan XMLPengenalan XML
Pengenalan XML
 
Internet dan Web
Internet dan WebInternet dan Web
Internet dan Web
 
Perkembangan Web
Perkembangan WebPerkembangan Web
Perkembangan Web
 
Bab II Use Case Diagram
Bab II Use Case DiagramBab II Use Case Diagram
Bab II Use Case Diagram
 
Native Xml Tutorial
Native Xml TutorialNative Xml Tutorial
Native Xml Tutorial
 
Persentasi Ajax Native Xml
Persentasi Ajax Native XmlPersentasi Ajax Native Xml
Persentasi Ajax Native Xml
 
Distributed Database Using Oracle
Distributed Database Using OracleDistributed Database Using Oracle
Distributed Database Using Oracle
 

Web Programming - PHP

  • 1. Web Programming– PHP PHP Hypertext Preprocessor Pemrograman Web (2010/2011) Teknik Informatika, Universitas Islam Indonesia Follow Hari Setiaji on Twitter
  • 2.
  • 3. Alur Kerja PHP Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
  • 4.
  • 5.
  • 6.
  • 7. Examples <?php echo &quot;<h3>Postincrement</h3>&quot;; $a = 5; echo &quot;Should be 5: &quot; . $a++ . &quot;<br />&quot;; echo &quot;Should be 6: &quot; . $a . &quot;<br />&quot;; echo &quot;<h3>Preincrement</h3>&quot;; $a = 5; echo &quot;Should be 6: &quot; . ++$a . &quot;<br />&quot;; echo &quot;Should be 6: &quot; . $a . &quot;<br />&quot;; echo &quot;<h3>Postdecrement</h3>&quot;; $a = 5; echo &quot;Should be 5: &quot; . $a-- . &quot;<br />&quot;; echo &quot;Should be 4: &quot; . $a . &quot;<br />&quot;; echo &quot;<h3>Predecrement</h3>&quot;; $a = 5; echo &quot;Should be 4: &quot; . --$a . &quot;<br />&quot;; echo &quot;Should be 4: &quot; . $a . &quot;<br />&quot;; ?> PHP Browser Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
  • 8. Examples <?php $a=5; $b=&quot;5&quot;; $hasil = $a==$b; echo &quot;$hasil <br />&quot;; $a=5; $c=5; $hasil = $a===$c; echo &quot;$hasil <br />&quot;; $jenis = ($a % 2 == 0 ? Genap : Ganjil); echo $a.&quot; adalah bilangan $jenis&quot;; ?> PHP Browser Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
  • 9.
  • 10. Examples <?php // Konstruksi If $bulan=date(&quot;m&quot;); if ($bulan==4) echo &quot;Bulan April&quot;; // Konstruksi If .. Else echo &quot;<br />&quot;; $today=date(&quot;w&quot;); if ($today==1) echo &quot;Hari Senin&quot;; else echo &quot;Bukan Hari Senin &quot;; // Konstruksi If .. Elseif.. Else echo &quot;<br />&quot;; $today=date(&quot;w&quot;); if ($today==1) echo &quot;Hari Senin&quot;; elseif ($today==2) echo &quot;Hari Selasa&quot;; else echo &quot;Bukan Hari Senin atau hari selasa &quot;; ?> PHP Browser Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
  • 11. Examples <?php $today=date(&quot;l&quot;); switch ($today) { case &quot;Sunday&quot; : echo &quot;Hari Minggu&quot;; break; case &quot;Monday&quot; : echo &quot;Hari Senin&quot;; break; case &quot;Tuesday&quot; : echo &quot;Hari Selasa&quot;; break; case &quot;Wednesday&quot; : echo &quot;Hari Rabu&quot;; break; default : echo &quot;Hari Sabtu&quot;; } ?> PHP Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
  • 12. Examples Hasil While <br /> <?php $bilangan =1; while ($bilangan <= 25) { echo $bilangan.&quot; &quot;; $bilangan++; } echo &quot;<br /><br />&quot;; ?> Hasil Do..While <br /> <?php $a=10; do { echo $a.&quot; &quot;; $a--; } while ($a > 5); ?> <br /><br /><b>Hasil For</b> <br /> <?php for ($i=1;$i<=6;$i++) { echo &quot;<h&quot;.$i.&quot;>Header $i </h&quot;.$i.&quot;>&quot;; } ?> Browser PHP Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
  • 13. Examples <b>Penggunaan Continue</b> <br /> <?php for ($i=1;$i<=15;$i++) { if ($i >5 && $i<=11) continue; echo $i.&quot;<br /> &quot;; } ?> PHP Browser Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
  • 14.
  • 15. Examples <?php //Pembuatan Array cara I $mahasiswa = array (&quot;Dani&quot;,&quot;Andini&quot;,&quot;Sheila&quot;,&quot;Rudi&quot;); //Pembuatan Array cara II $mahasiswa[] = &quot;Dani&quot;; $mahasiswa[] = &quot;Andini&quot;; $mahasiswa[] = &quot;Sheila&quot;; $mahasiswa[] = &quot;Rudi&quot;; //Pembuatan Array dengan indeks yang tidak terurut $musik=array (&quot;Jazz&quot;,5=>&quot;Blues&quot;,&quot;Rock&quot;,10=>&quot;Dankdut&quot;); //Pengaksesan Array mahasiswa echo &quot;Elemen Array mahasiswa pertama adalah : $mahasiswa[0] <br />&quot;; echo &quot;Elemen Array mahasiswa ketiga adalah : $mahasiswa[2] <br />&quot;; //Pengaksesan Array musik echo &quot;Elemen Array musik pertama adalah : $musik[0] <br />&quot;; echo &quot;Elemen Array musik ketiga adalah : $musik[6] <br />&quot;; echo &quot;Elemen Array musik keempat adalah : $musik[10] <br />&quot;; ?> PHP Browser
  • 16. Examples <?php //Pembuatan Array dengan indeks string $hari=array (&quot;Sunday&quot;=>&quot;Minggu&quot;, &quot;Monday&quot;=>&quot;Senin&quot;, &quot;Tuesday&quot;=>&quot;Selasa&quot;, &quot;Wednesday&quot;=>&quot;Rabu&quot;, &quot;Thursday&quot;=>&quot;Kamis&quot;, &quot;Friday&quot;=>&quot;Jumat&quot;, &quot;Saturday&quot;=>&quot;Sabtu&quot; ); echo &quot;jumlah elemen Array : &quot;.count($hari).&quot;<br />&quot;; $hari_inggris=date(&quot;l&quot;); echo &quot;Hari ini adalah hari $hari[$hari_inggris]&quot;; ?> PHP Browser Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
  • 17. Examples <?php //Array Multidimensi $peserta = array ( &quot;PHP&quot; => array(&quot;Anto&quot;,&quot;Dani&quot;,&quot;Rendra&quot;,&quot;Lani&quot;), &quot;MySQL&quot; => array(&quot;Bayu&quot;,&quot;Lina&quot;,&quot;Diana&quot;,&quot;Rinto&quot;), &quot;Delphi&quot; => array(&quot;Doni&quot;,&quot;Dini&quot;,&quot;Ela&quot;,&quot;Aryo&quot;), &quot;JSP&quot; => array(&quot;Fia&quot;,&quot;Rina&quot;,&quot;Roni&quot;,&quot;Dian&quot;)); //Pengaksesan dengan While while (list($indeks_1, $nilai_1) = each($peserta)) { echo &quot;<b>Peserta $indeks_1 </b>: <br />&quot;; $nomor=1; while (list($indeks_2,$nilai_2) = each($nilai_1)) { echo $nomor.&quot;.&quot;.$nilai_2.&quot;<br />&quot;; $nomor++; } } Browser PHP Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
  • 18. Examples <?php //Array Multidimensi $peserta = array ( &quot;PHP&quot; => array(&quot;Anto&quot;,&quot;Dani&quot;,&quot;Rendra&quot;,&quot;Lani&quot;), &quot;MySQL&quot; => array(&quot;Bayu&quot;,&quot;Lina&quot;,&quot;Diana&quot;,&quot;Rinto&quot;), &quot;Delphi&quot; => array(&quot;Doni&quot;,&quot;Dini&quot;,&quot;Ela&quot;,&quot;Aryo&quot;), &quot;JSP&quot; => array(&quot;Fia&quot;,&quot;Rina&quot;,&quot;Roni&quot;,&quot;Dian&quot;)); //Pengaksesan dengan Foreach foreach ($peserta as $indeks_1 => $nilai_1) { echo “<b>Peserta $indeks_1 </b>: <br />&quot;; $nomor=1; foreach ($nilai_1 as $indeks_2 => $nilai_2) { echo $nomor.&quot;.&quot;.$nilai_2.&quot;<br />&quot;; $nomor++; } } ?> Browser PHP Pemograman Web (2010/2011) – Hari Setiaji, S.Kom
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. Finally Pemograman Web (2010/2011) – Hari Setiaji, S.Kom

Editor's Notes

  1. Pemrograman Web