Author Topic: Can we use if statement inside Else part  (Read 25015 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?

IfandBut.com is place where you can meet serious webmasters and make new ties to grow your business.
Join Now!
anything

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.
Back