Penulisan PHP (Syntax)
PHP (Hypertext Preprocessor) mempunyai beberapa aturan Penulisan (Syntax).- Diantaranya harus diapit oleh tag :
- Setiap satu statement (perintah) diakhiri dengan titk-koma ( ; ).
- Case Sensitive untuk nama identifier buatan user (Variable, konstanta, fungsi dll)
- Tidak Case Sensitive untuk identifier bawaan php.
- Harus Diapit oleh tag :
- <? ......... ?>
- <?php ............ ?>
- <script languange="php"> ....... </script>
- <% ..................... %>
Contoh :
<?php
echo "Selamat Datang";
?>
Integrasi HTML dan PHP
<html>
<head>
<title>Belajar php</title>
</head>
<body>
<?php
echo "Hallo, ini script php";
?>
</body>
</html>
<?php
echo "Selamat Datang";
?>
Integrasi HTML dan PHP
<html>
<head>
<title>Belajar php</title>
</head>
<body>
<?php
echo "Hallo, ini script php";
?>
</body>
</html>
SMK MUHAMMADIYAH KAJEN || 2019
0 komentar:
Posting Komentar