Home >> Computer Language >> Php
Q.
What is the alternative structure for control structures?
Answer :
Php provides alternative structure for Some of the control structures namely, if, while, for, foreach, and switch .In alternate syntax is to change the opening brace to a colon (:) and the closing brace to endif;, endwhile;, endfor;, endforeach;, or endswitch;, respectively.
Example:
A is equal to 8
Example:
A is equal to 8
Posted By : akash