CatKul adalah Catatan Kuliah ketika ikut mata kuliah Pemrograman Internet. Karena sempat terfikir lumayan buat jadi note, makanya saya simpan dan sekarang di sharing di internet. Semoga bermanfaat, kalau ada yang kurang mengerti boleh ditanyakan di comment.
Berikut Script php pertama saya di mata kuliah Pemrograman Internet II.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pertemuan 1 Gan!! [I LOVE KASKUS]</title>
</head>
<body style="font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#000033">
<?php
echo "<b><span style='font-family:Arial, Helvetica, sans-serif; font-size:21px; color:#FF0000'>Latihan PHP Pertama-x</span></b>";
/*Identifier
#tipe data skalar
1. Boolean
2. Integer
3. String
4. Floatingpoint
#tipe data coumpound
1. array
2. object
# Tipe data Khusus
1. null
*/
echo "<p></p>";
echo "================================================<br/>";
echo "Boolean<br/>";
$a = true;
$b = false;
echo "\$a = $a<br/>";
echo "\$b = $b<--Isi bernilai nol<br/> ";
echo "================================================<br/>";
?>
<p></p>
<?php
/*urutan aritmatik - / **/
echo "================================================<br/>";
echo "Integer<br/>";
$harga = 1000;
$jumlah = 5;
$hargatotal = $harga * $jumlah;
echo "Harga = Rp.1000<br/>";
echo "Jumlah = 5<br/>";
echo "Harga totalnya adalah : Rp. $hargatotal";
echo "<p></p>";
echo "================================================<br/>";
?>
<?php
echo "================================================<br/>";
echo "Type Float<br/>";
$x = 1.5e30;
$y = 5.0;
$z = $x * $y;
echo "x = $x<br/>";
echo "y = $y<br/>";
echo "z = $z<br/>";
echo "================================================<br/>";
?>
</body>
</html>
Beberapa hal yang dibahas di pertemuan satu yaitu:
1. Penulisan variable di php
2. Mengenal variable dan tipe data di php


2 comments:
This is a nice article..
Its very easy to understand ..
And this article is using to learn something about it..
c#, dot.net, php tutorial
Thanks a lot..!
thanks for your visit... :D
Post a Comment