if else in php
if else in php
"if else" are simple condition statements.
example:
suppose you are hiring people for job and
if there are scale for jobs:
matric= scale 1
HSSE=scale2
BA=scale 3
MA=scale 4
so this is the criteria for different scale;
now you will check that
if someone is matric he will get scale1 job;
if someone is HSSE he will get scale2 job;
if someone is BAhe will get scale3 job;
if someone is MA he will get scale4 job;
in code:
[code]
<?php
$person="HSSC";
if($person=="matric")
echo "you can get job in scale 1";
if($person=="HSSC")
echo "you can get job in scale 2";
if($person=="BA")
echo "you can get job in scale 3";
if($person=="MA")
echo "you can get job in scale 4";
?>
[/code]
now you can change the value of variable $person;
like $person="HSSC";
$person="BA";
$person="MA";
ask any question in comments
best of luck
.....................................................................................................................
php in urdu tutorials, php in urdu language,
php programming tutorial,
php programming tutorial in urdu,
learn php in urdu, learn php in 14 days,
learn php online, learn php in urdu videos,
php for beginners, php books in urdu,
books in urdu pdf
0 comments: