Presentation is loading. Please wait.

Presentation is loading. Please wait.

Syntax : If ( Expression ) If ( Expression ) {Statements; } Example : <?php <?php $a=5; $a=5; If ( $a == 1) If ( $a == 1) { echo “It is 1:” } ?> ?>

Similar presentations


Presentation on theme: "Syntax : If ( Expression ) If ( Expression ) {Statements; } Example : <?php <?php $a=5; $a=5; If ( $a == 1) If ( $a == 1) { echo “It is 1:” } ?> ?>"— Presentation transcript:

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>


Download ppt "Syntax : If ( Expression ) If ( Expression ) {Statements; } Example : <?php <?php $a=5; $a=5; If ( $a == 1) If ( $a == 1) { echo “It is 1:” } ?> ?>"

Similar presentations


Ads by Google