Rabu, 06 Februari 2019

Penulisan PHP (Backend Programming)

syntax dasar php programming

Penulisan PHP (Syntax)

PHP (Hypertext Preprocessor) mempunyai beberapa aturan Penulisan (Syntax).

  1. Diantaranya harus diapit oleh tag :
  2. Setiap satu statement (perintah) diakhiri dengan titk-koma ( ; ).
  3. Case Sensitive untuk nama identifier buatan user (Variable, konstanta, fungsi dll)
  4. Tidak Case Sensitive untuk identifier bawaan php
  5. 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>


SMK MUHAMMADIYAH KAJEN || 2019

0 komentar:

Posting Komentar