Senin, 07 Desember 2009

script php

INI Scriptnya :
";print "Nilai \$nilai1=$nilai1 dan \$nilai2=$nilai2

";print "\$nilai1 + \$nilai2 = $jumlah
";print "\$nilai1 - \$nilai2 = $kurang
";print "\$nilai1 * \$nilai2 = $kali <:br>"; print "\$nilai1 / \$nilai2 = $bagi
"; print "\$nilai1 % \$nilai2 = $sisa
"; ?>
";print "Nilai \$nilai1=$nilai1 dan \$nilai2=$nilai2

";print "\$nilai1 + \$nilai2 = $jumlah
";print "\$nilai1 - \$nilai2 = $kurang
";print "\$nilai1 * \$nilai2 = $kali <:br>"; print "\$nilai1 / \$nilai2 = $bagi
"; print "\$nilai1 % \$nilai2 = $sisa
"; ?>

";print "Nilai \$nilai1=$nilai1 dan \$nilai2=$nilai2

";print "\$nilai1 + \$nilai2 = $jumlah
";print "\$nilai1 - \$nilai2 = $kurang
";print "\$nilai1 * \$nilai2 = $kali <:br>"; print "\$nilai1 / \$nilai2 = $bagi
"; print "\$nilai1 % \$nilai2 = $sisa
"; ?>

"; } $bila = 5; $pola = 1; print "
Bilangan ganjil antara 5 sampai 25
";for ($pola=1; $pola<10; style="font-weight: bold;">Foreach

Foreach


INI Scriptnya :
";foreach ($klub as $nilai){print "$nilai
";}?>

contoh tampilan script



phpheader(" Content-Type:image/jpeg" );$background=@imagecreate(100,100);$kuning=imagecolorallocate($background,250,250,300);$hitam=imagecolorallocate($background,0,0,0);imagearc($background,50,50,50,50,0,360,$hitam);imageJPEG($background);imagedestroy($background);? >

< ?phpheader(" Content-Type:image/jpeg" );$background=@imagecreate(100,100);$kuning=imagecolorallocate($background,250,250,300);$hitam=imagecolorallocate($background,0,0,0);imagearc($background,50,50,50,50,0,360,$hitam);imageJPEG($background);imagedestroy($background);? >


Contoh Skrip PHP ( Chapter 1 )

contoh5
contoh4

contoh3


contoh2







contoh1