IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
Making decision and repeating in PHP
1. Making Decision and
Repeating Yourself
Understanding True and False
Making Decisions
Building Complicated Decisions
Repeating Yourself
2. Understanding True and False
• All integers and floating point except 0 and 0.0 are true
• All strings are true except two strings:
• String containing nothing at all(“ ”)
• String containing only character 0(“0”)
• An empty array is also evaluated as false
3. Making Decisions
• Making a decision with if( )
• Multiple statements in an if( ) code block
• Using else with if( )
• Using elseif( )
• elseif( ) with else