PHP
Examples
Basic syntax
php
// start of PHP code
<?php
// PHP code goes here
?>
// end of PHP code
Printing data on screen
php
<?php
echo
"Hello World!"
;
?>
PHP variables
php
<?php
// variables
$nome
=
'Danilo'
;
$sobrenome
=
'Santos'
;
$pais
=
'Brasil'
;
$email
=
'danilocarsan@gmail.com'
;
// printing the variables
echo
$nome
;
echo
$sobrenome
;
echo
$pais
;
echo
$email
;
?>
See also
- Official website
- PHP on Wikipedia
- PHP programming on Wikibooks
- datarist Web Docs Glossary