Our volunteers haven't translated this article into ไทย yet. Join us and help get the job done!
You can also read the article in English (US).

PHP (a recursive initialism for PHP: Hypertext Preprocessor) is an open-source server-side scripting language that can be embedded into HTML to build web applications and dynamic websites.

Examples

Basic syntax

  // start of PHP code
<?php  
     // PHP code goes here
 ?>
// end of PHP code

Printing data on screen

<?php 
   echo "Hello World!";
?>

PHP variables

​​​​​​​​​​​​​​<?php
 // variables
 $nome='Danilo';
 $sobrenome='Santos';
 $pais='Brasil';
 $email='danilocarsan@gmailcom';
​​​​​​​
 // printing the variables
 echo $nome;
 echo $sobrenome;
 echo $pais;
 echo $email;
?>

Learn more

Document Tags and Contributors

ป้ายกำกับ: 
อัปเดตล่าสุดโดย: mdnwebdocs-bot,