Variable declaring in PHP.


Variable: 

Variable is a typical name connected with a quality and whose related worth may be changed. 

For Example: 

txt=a; 

txt=b;[here txt is a variable and "an" and "b" is value.] 

A few standards for PHP variables: 

  • A variable begin with "$" sing, trailed by the name of the variable. 

  • Variable name must begin with a letter or underscore character. 

  • Variable name can not begin with a number. 

  • Variable name can just contain alpha-numeric characters and underscores

  • Variable names are case-delicate.

Variable declaring in PHP:
<?php
$txt=a;
echo '$txt';
?>



No comments:

Post a Comment