18 March, 2021
21 November, 2018
PHP : Introduction for PHP
Programing Coderfunda November 21, 2018 hindi-php, php No comments
PHP : Introduction for PHP
Programing Coderfunda November 21, 2018 hindi-php, php No comments
05 November, 2018
Operators in Hindi
Programing Coderfunda November 05, 2018 hindi-php, Operators-Php, php No comments
- Arithmetic Operators
- Comparison Operators
- Logical Operators
- Assignment Operators
- Increment and Decrement Operator
Operators in Hindi
Programing Coderfunda November 05, 2018 hindi-php, Operators-Php, php No comments
- Arithmetic Operators
- Comparison Operators
- Logical Operators
- Assignment Operators
- Increment and Decrement Operator
Assignment Operators in Hindi
Programing Coderfunda November 05, 2018 Assignment-Operators-Php, hindi-php, php No comments
Operators | For Example | Description |
---|---|---|
= | a = b | Assignment Operator |
+= | a += b or a = a + b | Add Assignment Operator |
-= | a -= b or a = a - b | Subtract Assignment Operator |
*= | a *= b or a = a * b | Multiply Assignment Operator |
/= | a /= b or a = a / b | Divide Assignment Operator |
%= | a %= b or a = a % b | Modulus Assignment Operator |
Example = (Assignment Operator)
Source Code :Output :123456<?php
$a = 5;
$b = $a;
echo "Value of a : ".$a. "<br />";
echo "Value of b : ".$b;
?>
Value of a : 5
Value of b : 5
Example += (Add Assignment Operator)
Source Code :Output :123456<?php
$a = 5;
$b = 10;
$a += $b; // a = a + b;
echo "Value of a : ".$a;
?>
Value of a : 15
Example -= (Subtract Assignment Operator)
Source Code :Output :123456<?php
$a = 5;
$b = 10;
$a -= $b; // a = a - b;
echo "Value of a : ".$a;
?>
Value of a : -5
Example *= (Multiply Assignment Operator)
Source Code :Output :123456<?php
$a = 5;
$b = 10;
$a *= $b; // a = a * b;
echo "Value of a : ".$a;
?>
Value of a : 50
Example /= (Divide Assignment Operator)
Source Code :Output :123456<?php
$a = 5;
$b = 10;
$a /= $b; // a = a / b;
echo "Value of a : ".$a;
?>
Value of a : 0.5
Example %= (Modulus Assignment Operator)
Source Code :Output :123456<?php
$a = 5;
$b = 10;
$a /= $b; // a = a % b;
echo "Value of a : ".$a;
?>
Value of a : 5
Assignment Operators in Hindi
Programing Coderfunda November 05, 2018 Assignment-Operators-Php, hindi-php, php No comments
Operators | For Example | Description |
---|---|---|
= | a = b | Assignment Operator |
+= | a += b or a = a + b | Add Assignment Operator |
-= | a -= b or a = a - b | Subtract Assignment Operator |
*= | a *= b or a = a * b | Multiply Assignment Operator |
/= | a /= b or a = a / b | Divide Assignment Operator |
%= | a %= b or a = a % b | Modulus Assignment Operator |
Example = (Assignment Operator)
Source Code :Output :123456<?php $a = 5; $b = $a; echo "Value of a : ".$a. "<br />"; echo "Value of b : ".$b; ?>
Value of a : 5 Value of b : 5
Example += (Add Assignment Operator)
Source Code :Output :123456<?php $a = 5; $b = 10; $a += $b; // a = a + b; echo "Value of a : ".$a; ?>
Value of a : 15
Example -= (Subtract Assignment Operator)
Source Code :Output :123456<?php $a = 5; $b = 10; $a -= $b; // a = a - b; echo "Value of a : ".$a; ?>
Value of a : -5
Example *= (Multiply Assignment Operator)
Source Code :Output :123456<?php $a = 5; $b = 10; $a *= $b; // a = a * b; echo "Value of a : ".$a; ?>
Value of a : 50
Example /= (Divide Assignment Operator)
Source Code :Output :123456<?php $a = 5; $b = 10; $a /= $b; // a = a / b; echo "Value of a : ".$a; ?>
Value of a : 0.5
Example %= (Modulus Assignment Operator)
Source Code :Output :123456<?php $a = 5; $b = 10; $a /= $b; // a = a % b; echo "Value of a : ".$a; ?>
Value of a : 5
Logical Operators in Hindi
Programing Coderfunda November 05, 2018 hindi-php, Logical-Operators-Php, php No comments
Operators | Description |
---|---|
&&(and) | AND |
||(or) | OR |
! | NOT |
Example for &&(and) Logical Operator
Output :1234567<?php
$a = 5;
$b = 6;
if(($a < $b) || ($a > $b))
echo "logic is true.";
?>
logic is true.
Example for ||(or) Logical Operator
Output :1234567<?php
$a = 5;
$b = 6;
if(($a < $b) || ($a > $b))
echo "logic is true.";
?>
logic is true.
Example for ! Logical Operator
Output :1234567<?php
$a = 5;
$b = 6;
if(!($a > $b))
echo "logic is true.";
?>
logic is true.
Logical Operators in Hindi
Programing Coderfunda November 05, 2018 hindi-php, Logical-Operators-Php, php No comments
Operators | Description |
---|---|
&&(and) | AND |
||(or) | OR |
! | NOT |
Example for &&(and) Logical Operator
Output :1234567<?php $a = 5; $b = 6; if(($a < $b) || ($a > $b)) echo "logic is true."; ?>
logic is true.
Example for ||(or) Logical Operator
Output :1234567<?php $a = 5; $b = 6; if(($a < $b) || ($a > $b)) echo "logic is true."; ?>
logic is true.
Example for ! Logical Operator
Output :1234567<?php $a = 5; $b = 6; if(!($a > $b)) echo "logic is true."; ?>
logic is true.