Monday, 4 June 2018

Assignment Operator in php





<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>assignment operator</title>

</head>



<body>



<?php

$x=4;



echo "<h1> = operator </h1> ";





$y=$x;



echo "value of y = ".$y;

echo "<br/>value of x = ".$x;



echo "<h1> += operator </h1> ";



$y+=$x; // y=y+x

echo "value of y = ".$y;

echo "<br/>value of x = ".$x;



echo "<h1> -= operator </h1> ";



$y-=$x; // y=y-x

echo "value of y = ".$y;

echo "<br/>value of x = ".$x;





echo "<h1> *= operator </h1> ";



$y*=$x; // y=y*x

echo "value of y = ".$y;

echo "<br/>value of x = ".$x;





echo "<h1> /= operator </h1> ";



$y/=$x; // y=y/x

echo "value of y = ".$y;

echo "<br/>value of x = ".$x;





















?>









</body>

</html>

No comments:

Post a Comment

Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...