PHP If Else And Else If

PHP if Else And Else If Statements In Hindi

PHP

PHP Else If Statements In Hindi:- if-else Else If statement Yani Control Statements Ko Diya Gya Expression True Hota Hai To Tab if Wala Statement Execute Hota or Agar Expression Else If Wala True Hota Hai to Tab Else If Wala Statement Execute Hota Hai or Agar Expression False Hota Hai Tab Else Wala Statement Execute Nhi Hota Hai |

Also Read :-

Else If Statements In PHP in Hindi

If Statement Ko Ham Jab Istemal Karte Hain Jaha Par Hame Koi Condition Ko Check Karna Hota Hain |

Jab Hamare Duvara Diya Gaya Test Expression Agar True Hota Hai To If Statement Execute Hota Hain |

Read Also : Full Course C programming in Hindi

IF Statements In Hindi

Syntax:

if( condtion )
{
	//statements;
}

Example:

<?php

$value = 14;

if ($value < 20)
{
# code...
echo "This Value Is Bigger";
}

?>;

Output:

This Value Is Bigger

If Else Statements in Hindi

If else statement in PHP yani control statements ko diya gya expression true hota hai tab if wala statement execute hota hai or agar expression false hota hai tab else wala statement execute nhi hota hai |

Syntax:

if( condtion )
{
	//if_statements;
}
else
{
	//else_statements;
}

Example:

<?php

$value = 19;

if ($value > 20)
{
  # code...
  echo "This Value Is Bigger";
}
else 
{
  echo "This Value Is Small";
}
?>;

Aap Upper DIye Gaye Program Ko Dekh Sakte Hain Or Jab If Condition True Hoti Hain If Wala Part Execute Hota Hain Or Jab If Condition False Hoti Hain To Else Wala Part Eecute Hota Hain |

Output:

This Value Is Small

Else If Statements In Hindi

Else If statement Yani Control Statements Ko Diya Gya Expression True Hota Hai To Tab if Wala Statement Execute Hota or Agar Expression Else If Wala True Hota Hai to Tab Else If Wala Statement Execute Hota Hai or Agar Expression False Hota Hai Tab Else Wala Statement Execute Nhi Hota Hai |

Syntax

Syntax
if (condition) {
  code to be executed if this condition is true;
} elseif (condition) {
  code to be executed if first condition is false and this condition is true;
} else {
  code to be executed if all conditions are false;
}

Example

<?php
$t = date("H");

if ($t < "10") {
  echo "Have a good morning!";
} elseif ($t < "20") {
  echo "Have a good day!";
} else {
  echo "Have a good night!";
}
?>

Dosto mujhe ummed hai ki aap If Else And Else If Statements In PHP In Hindi ko acchi tarah se samanj gye honge agar aap ko ye post acchi lage to mere is website ko jarur follow kre or ha agar aap video bhi dekhna chahte hai to aap mere channel ko bhi subscribe kar sakte hai. channel ka link aapko home page par mil jayega |

Leave a Reply

Your email address will not be published. Required fields are marked *