echo “Hello World”; ?>"> echo “Hello World”; ?>">
Upload presentasi
Presentasi sedang didownload. Silahkan tunggu
Diterbitkan olehSanto Rahayu Telah diubah "9 tahun yang lalu
2
Programming language designed for building dynamic web applications Server-side Scripting Internet Web Browser Apache PHP MySQL Disk Drive
3
PHP code begins with the tag " “ Or with the simple form like “ ” Every command or statement in PHP code must end with a semicolon ";" <?php echo “Hello World”; ?> <? echo “Hello World”; ?>
4
PHP inner HTML PHP dalam HTML <?php echo “ Paragraf 2 : Teks dari kode PHP ”; ?> <?php PHP dalam HTML <?php echo “ Paragraf 2 : Teks dari kode PHP ”; ?> <?php
5
HTML inner PHP <?php echo “ ”; echo “ HTML dalam PHP ”; echo “ ”; echo “ Paragraf 2 : Teks dari kode PHP ”; echo “ ”; ?> <?php echo “ ”; echo “ HTML dalam PHP ”; echo “ ”; echo “ Paragraf 2 : Teks dari kode PHP ”; echo “ ”; ?>
6
Integer Float String Boolean Array
7
assignment operator › = aritmatic operator › +, -, *, /, %, ++, -- relasional operator › ==, !=, >, >=, <, <= logic operator › &&, ||, !
8
‘If’ Conditional If (condition) { Statemen; } else { Other Statemen; } If (condition) { Statemen; } else { Other Statemen; }
9
‘Switch’ Conditional <?php Switch ($month) { case 1 : case 2 : case 3 : case 4 : case 5 : echo “Mei”; case 6 : case 7 : case 8 : echo “August”; case 9 : echo “September”; case 10 : case 11 : case 12 : default : echo “This is default statement.”; exit(); } ?> <?php Switch ($month) { case 1 : case 2 : case 3 : case 4 : case 5 : echo “Mei”; case 6 : case 7 : case 8 : echo “August”; case 9 : echo “September”; case 10 : case 11 : case 12 : default : echo “This is default statement.”; exit(); } ?>
10
‘While’ Loop <?php while(expression) { Statement; } ?> <?php while(expression) { Statement; } ?>
11
‘do-while’ Loop <?php do { Statement; } while (expression); ?> <?php do { Statement; } while (expression); ?>
12
‘For’ Loop <?php for(inisialisation; expression; increment/decrement) { Statement; } ?> <?php for(inisialisation; expression; increment/decrement) { Statement; } ?>
13
‘Foreach’ Loop <?php foreach($array as $current) { Statement; } ?> <?php foreach($array as $current) { Statement; } ?>
14
Pemula PHP <?php echo " Awal Mula "; echo "Hello World "; print "Hello World "; echo " "; echo " Variable "; $angka = 99; echo "Ini adalah angka = $angka "; $angka_2 = $angka + 1; echo "Ini hasilnya = $angka_2 "; echo " "; echo " Looping "; for ($i=0; $i<=$angka_2; $i++) { echo "Urutan ke $i. "; } ?> Pemula PHP <?php echo " Awal Mula "; echo "Hello World "; print "Hello World "; echo " "; echo " Variable "; $angka = 99; echo "Ini adalah angka = $angka "; $angka_2 = $angka + 1; echo "Ini hasilnya = $angka_2 "; echo " "; echo " Looping "; for ($i=0; $i<=$angka_2; $i++) { echo "Urutan ke $i. "; } ?>
Presentasi serupa
© 2024 SlidePlayer.info Inc.
All rights reserved.