echo "Hello!" ;
// self-defined variales
$first_name = "Keeru"; #Define a variable
echo $first_name;
echo "
";
//pre-defined variables
// echo $_SERVER['SCRIPT_FILENAME'];
//echo $_SERVER['HTTP_USER_AGENT'];
$file = $_SERVER['SCRIPT_FILENAME'];
$user = $_SERVER['HTTP_USER_AGENT'];
echo $file;
echo $user, "
";
$x = 1; #define a number variable
$y = 100;
//addition
$sum = $x +$y ;
echo $sum, "
";
//division
$result = $x / $y ;
echo $result , "
";
//post-increment
$i = 0;
//$i = $i + 1;
echo $i++; // increment i by 1 .After executing this
//$i
//pre-increment
$i = 0;
echo ++$i ,"
";
//new value is immediately returned to //current variable
// $name="jane"
define('GREETING', "WELCOME TO MY WEBSITE"); //define a constant
echo GREETING ;
echo "
";
echo "Hello". GREETING;
echo "
";
define('PI' , 3.14);
echo PI;
echo "The value of PI is" . PI;
echo "
";
// $name=Jane
define('WELCOME',"WELCOME TO Jane's WEBSITE");
echo WELCOME;
echo "
";