Website Development Prices

Search Blog

Saturday, May 2, 2015

PHP komentari (PHP Comments)

Komentari su napomena koje dodajete na svoje strane da bi ste nekom objasnili sta de desava. Najcesca su dva tipa komentara:

  • Blok komentar
  • Linijski komentar ili komentar u jednom redu
Blok komentar 


<?php
/* Ovo je primer
blok komentara
*/
echo "Pozdrav iz PHP-a.";
?>

Linijski komentar

<?php
// Ovo je primer
# linijskog komentara

echo "Pozdrav iz PHP-a.";
?>

Linijski komentar 2

<?php
// Ovo je drugi primer
// linijskog komentara

echo "Pozdrav iz PHP-a.";
?>

Comments are notes that you add to your side to get you some explaining what is happening. 

The most common are two types of comments:

  • block comment
  • line a comment or a comment in one line


Block comment

<? php
/ * This is an example
block comments
* /
echo "Hello from PHP. ';
?>

Line comment

<? php
// This is the case
# of line comments

echo "Hello from PHP. ';
?>



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.