Tuesday, 9 June 2020

declaration of variable and print

php -leeson -3
variable is used to store value
var uname="user";
javascript
$uname = 'sameer';
single quotes or double quotes
there is no space immediate of dollar sign
print the variable value  using echo
<?php
$username= "vamsi";
string is declared in double quotes
echo $username;
?>
types of variable
sring and number variable
<?php
$x= 150;
$y= 250;
number is declared withoput  quotes
$z = $x+ $y;
echo $z;
$z
?>
echo "$z";
400
echo 'the result is :';
the result is: 400
echo "$z";



whats the use of variable
how to declare variable in javascript
how to declare variable in php
how to print the variable values
types of variables
how to join two vaiables
hpw to add the data in variables
how to print the numbher

No comments:

Post a Comment