I know this may be simple question but want to know every ones opinion on this.
what is the difference between switch and IF function in PHP?? What I can see is wher
No, you are right.
There are not much difference between these statements.
You may use one you like.
Just bear in mind that if you have to use more than 3-4 consecutive conditions - that means you most likely have design faults.
Usually you can substitute such a statement with a loop or with more clear application design.