PHP variable


PHP variable

PHP variable


1] variables are declared /represent with a dollar sign ($) by the variable name.

2] A variable is a container to store to add values() of

Type :-

1] int

2] float

3] string

4] boolean

5] array

6] object

7] resources etc.

3] Variable names must begin with a letter or underscore character, followed by any combination of letters, numbers, or underscores.

Rules Variable Declaration


1] variable name must start with any Alphabet or symbol , variable name.
2] Can not start with a number.
eg :- $s1 = correct , $1s = wrong

3] PHP variable name are case sensitive .
   EG- $a ,$A, are two different variables.

PHP variable
Program :-

<?php
$no1=10;
$no2=5;
echo $no1+$no2;
?>

PHP variable
Output :-

php variable /output



Related Post :-

world wide web and internet 

how to comment in html code

how to create login form in php

Comments

Popular posts from this blog

What Is CSS Text Color in 2026

CSS Padding Property Explained

CSS Outline Color Property in 2026