Download presentation
Presentation is loading. Please wait.
Published byMyron Dennis Modified over 8 years ago
1
Syntax : If ( Expression ) If ( Expression ) {Statements; } Example : <?php <?php $a=5; $a=5; If ( $a == 1) If ( $a == 1) { echo “It is 1:” } ?> ?>
2
Syntax : if ( Expression ) if ( Expression ) { Expression When Condition True ; } else else { Statement When Condition False ; }
3
Syntax : foreach ($Array name as $Array Item ) foreach ($Array name as $Array Item ){ Executes the content of these Braces ; } Executes the content of these Braces ; }
4
Example : <?php $array=array(1,2,3,4,5); $array=array(1,2,3,4,5); foreach ( $array as $data ) foreach ( $array as $data ){ echo $data; }?>
5
Example : Example :<html><body> <?php $India=array(“GUJARAT”, “GOA”,”PUNJAB”); Foreach($India as $State => $State_index) { echo “ $State_index- $State”; } ?></font></center>
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.