Friday, 1 June 2018

3-Variable in php with previous commands practice







<!doctype html>

<html>

<head>

<meta charset="utf-8">

<title>lesson 3</title>

</head>



<body>

<?php

$x=5;

$y=10;



print "<h1> Before swapping  </h1>";



echo "value of x = ".$x;

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





print "<h1> After swapping  </h1>";



$x= $x+$y; // 5+10 =15

$y=$x-$y; //15-10 =5

$x=$x-$y; //15-5=10



echo "value of x = ".$x;

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









?>





</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 ...