PHP Flow of Control (If-else, Switch)

Back To PHP Index


1. php program to demonstrate if statement example 1 , check whether number is equal to 10 or not - Code
2. php program to demonstrate if statement example 2, check whether a number is greater than 10 or not - Code
3. php program to demonstrate if statement example 3,program to find whether number is less than 10 or not - Code
4. php program to demonstrate if statement example 4 , check whether number is less than or equal to 10 - Code
5. php program to demonstrate if statement example 5 , check whether number is greater than or equal to 10 - Code
6. php program to demonstrate if statement example 6 , check whether number is not equal to 10 - Code
7. program to demonstrate if-else statement example 1 , check whether number is equal to 10 or not - Code
8. php program to demonstrate if-else statement example 2 , check whether number is greater than 10 or not - Code
9. php program to demonstrate if-else statement example 3 , check whether number is less than 10 or not - Code
10. php program to demonstrate if-else statement example 4, check whether number is equal to 10 or not - Code
11. php program to demonstrate if-else statement example 5, check whether number is greater than 10 or not - Code
12. php program to demonstrate if-else statement example 6, check whether a is less than or equal to 10 or greater than 10 - Code
13. php program to demonstrate if-else statement example 7, check whether a is greater than or equal to 10 or less than 10 - Code
14. php program to demonstrate if-else statement example 8, check whether a is greater than or equal to 10 or less than 10 - Code
15. php program to demonstrate if-else statement example 9, check whether a is less than or equal to 10 or greater than 10 - Code
16. php program to input three numbers and find largest of three numbers using if-else statement - Code
17. php program to input three numbers and find smallest of three numbers using if-else statement - Code
18. php program to demonstrate if-else statement and (check whether marks are between 80 and 90) - Code
19. php program to demonstrate if-else statement program to demonstrate if or (check whether marks are equal to either 80 or 90 - Code
20. php program to input a character and check whether it is equal to a or b using if statement example of OR ( || ) operator - Code
21. php program to compute grade of a student based on marks using if else statement - Code
22. php program to check whether number entered is odd or even using if-else statement - Code
23. php program to input two numbers a and b and check whether a is divisible by b or not using if-else statement - Code
24. php program to check whether user has entered vowel or not using if-else statement - Code
25. php program to calculate discount on a price,if price is above 1000 then discount is 10% otherwise 5 % - Code
26. program to demonstrate switch-case statement example 1, displaying day of the week - Code
27. php program to demonstrate switch-case example 2,displaying month of the year - Code
28. php calculate da,hra based on basic example of if-else statement - Code
29. php program to input three numbers and print them in ascending order using if-else statement - Code
30. php program to input three numbers and print them in descending order using if-else statement - Code
31. php program to convert fahrenheit temp to celsius and vice versa using if-else statement - Code
32. program to input a character and check whether it is a vowel or not using switch statement - Code