Skip to content

Commit cb8ed61

Browse files
done
1 parent 69e916e commit cb8ed61

2 files changed

Lines changed: 51 additions & 4 deletions

File tree

Addition_program.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
?>
1717
</body>
1818
<footer style="position:fixed; left:0; right:0; bottom:0; background:#f8f8f8; padding:10px 0; text-align:center; border-top:1px solid #e0e0e0; font-family:Arial, sans-serif;">
19-
<strong>Code Is Writen By <a href="https://www.linkedin.com/in/parasgupta-binary0101" target="_blank">Paras Gupta</a></strong>
19+
<strong>Code Is Writen By <a href="https://www.linkedin.com/in/parasgupta-binary0101">Paras Gupta</a></strong>
2020
</footer>
21-
</html>
21+
</html>

Operator.php

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
* 2) Relational operator --> (//),(>),(<),(<==),(>==),(==),(!=),(===),(!==),(<>),(<=>)
2525
* 3) Assignment operator
2626
* 4) Increment/Decrement operator --> (++),(--)
27-
* 5) Logical operator
28-
* 6) String operator
27+
* 5) Logical operator --> (&&),(||),(!)
28+
* 6) String operator (Also called Concat operator) --> (.),(.=)
2929
* 7) Array operator
3030
* 8) Conditional assignment operator
3131
*
@@ -108,6 +108,53 @@
108108
echo "D= ".$d."<br>","A= ".$a."<br>","C= ".$c."<br>";
109109
echo "<br>";
110110

111+
//Logical operator
112+
$a=50;
113+
$b=60;
114+
115+
echo "Logical operator:<br>";
116+
echo "<br>";
117+
118+
// (&&) AND operator
119+
120+
if($a>25 && $b>10)
121+
echo "True<br>";
122+
else
123+
echo "False<br>";
124+
125+
// (||) OR operator
126+
127+
if($a>60 || $b>70)
128+
echo "True<br>";
129+
else
130+
echo "False<br>";
131+
132+
// (!) NOT operator
133+
134+
if(!($a>25 && $b>10))
135+
echo "True<br>";
136+
else
137+
echo "False<br>";
138+
139+
echo "<br>";
140+
141+
/***
142+
* Q2. Now What Will Be Output Of This Code:
143+
*
144+
* $a=10;
145+
* $b=20;
146+
*
147+
* if($a and $b)
148+
* echo "True<br>";
149+
* else
150+
* echo "False<br>";
151+
*
152+
*
153+
* Answer: True (Becouse Both Numbers Having (1) Not Zero
154+
* If We Write B=0 Then It Will Give False)
155+
*
156+
* ***/
157+
111158
?>
112159
</h1>
113160
</body>

0 commit comments

Comments
 (0)