Author Topic: Can we use if statement inside Else part  (Read 11643 times)

Rahul Kaushik

  • Newbie
  • *
  • Posts: 18
Can we use if statement inside Else part
« on: January 12, 2012, 02:09:32 PM »
HI,
     I am new to php and i want to learn it very deeply i want to use the IF inside the ELSE part
   can it will work well .pls help me

            thanks

Jaffery

  • Administrator
  • Full Member
  • *****
  • Posts: 158
Re: Can we use if statement inside Else part
« Reply #1 on: January 13, 2012, 05:51:59 AM »
Yes, you can use if statement inside else.
You can use either elseif , it simply means that if no previous condition is true then it will look this condition, however, in this  condition it will also check condition given.
Other way is :

if ()
{
......
}
else
{
if(new condition)
{
}
}

 

X

Do you know?

You can get Free Hosting by participating in IfandBut.com community.
Know more..
Join Now!
anything