Skip to content
+91-8802000175info@websjyoti.com
Join PHP Internship

PHP Training in Gurgaon

PHP Full Stack Developer Training

  • PHP Laravel
  • Digital Marketing
  • MERN Stack
  • Placements
  • Locations
    • Muzaffarpur Location
    • Php Training in Baksar
    • Php Training in Balia
    • PHP Training Gorakhpur
    • PHP Training in Patna
    • Training in Bangalore
    • PHP Training in Noida
    • PHP Training in Delhi
    • Training in Ghaziabad
  • CONTACT

PHP -Building Blocks

  • Home
  • php-training-in-gurgaon
  • PHP -Building Blocks
29 Mar 2017
hirdeshphp-training-in-gurgaonbest php ajax institutes in gurgaon, best php coaching gurgaon, learn php in gurgaon haryana, php ajax training in gurgaon, php coaching center in gurgaon, php coacing classes in gurgaon, php courses in gurugram haryana, php institutes gurgaon, php mysql institutes in gurgaon, php training and placement institutes in gurgaon, php training center in gurgaon haryana

If –else statements:

if…else statement – executes set of codes if a condition is true and another code if the condition is false

Within a statement, if a certain condition is true, then something happens. Otherwise, something else happens. We can continue adding else statements as many times as we need.

So, within PHP statement, we first define the variable and then set up the conditional statements like this:

Syntax:

if (condition)

code to be executed if condition is true;

elseif (condition)

code to be executed if condition is true;

else

code to be executed if condition is false;

Example 1:

<?php

$avg = 50

if ($avg>60)

{

echo “You have a good score”;

}

else

{

echo “Score is less than average”;

}

?>

Example 2: 

<?php

$status = 1;

if ($status== 1)

{

print (“<img src =images/right.jpg>”);

}

else

{

print (“<img src =images/cross.jpg>”);

}

?>

The variable called $status has been assigned a value of 1.The first line of if statement tests to see what is inside of the variable called $status. It‘s testing to see whether this variable has a value of 1.

Post navigation

The For Loop
The While Loop

Recent Posts

  • Webs Jyoti Conducted an Internship Program at St. Andrews College
  • Webs Jyoti Welcomes Interns from Symbiosis
  • Students Successfully Placed through Webs Jyoti in Various Profiles
  • PHP Training and Placement Experience at Webs Jyoti
  • 5 reason why digital marketing is important

Placement Corner

Excel Trainer
PHP trainer
Digital Marketing trainer
Advance Excel Trainer
SQL Trainer
Webs jyoti Placement
PHP traning Gurgaon
Webs Jyoti Placement
digital marketing
excel training Webs Jyoti
PHP Placement
SQL Training for Webs Jyoti
Webs Jyoti Placement
Trainer From Websjyoti
Digital marketing placement
PHP Training in Gurgaon
Excel training in gurgaon
MY SQL placement
Excel placement
Digital Marketing placement
PHP placement
advance excel placement
digital Marketing placement
SEO Placement
Java Script Placement
Advance excel placement
php placement
web development
Excel trainer
PHP placement
websjyoti Placement
php traning in gurgaon
Webs Jyoti placemnt
digital marketing placement
Webs Jyoti placement
PHP Traning in Gurgaaun
Advance excel placement
MY SQL placement
Web development
Excel Trainer
Webs Jyoti Placement
Webs Jyoti Placement
PHP placement
Digital Marketing placement
SEO experts
SMO placement
Webs Jyoti Placement
Webs Jyoti Placement
Advance Excel Placement
Webs Jyoti Placement
Webs Jyoti Placement
Graphic Designer
Advance Excel Placement
Webs Jyoti Placement
Excel Placement
Webs Jyoti Placement
Digital Marketing Placement
Webs Jyoti Placement
Excel Placement
Advance Excel Placement

Contact us

Webs Jyoti - M-24, Old DLF Colony, Sector 14, Gurgaon, Haryana 122001

Contact: +91-8802000175

Email: info@websjyoti.com

© 2024 Webs Jyoti, All right reserved. Proudly Powered By Webs Jyoti

Education Base by Acme Themes

WhatsApp us