Last active
October 2, 2018 05:17
-
-
Save MubinSayed/72377cc0f0ace3201b3b986aae83da03 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$fruits = array('apple', 'mango', 'grape', 'orange'); | |
echo 'Do While Loop Example <br>'; | |
$i = 0; | |
do{ | |
echo ('I am '.$fruits[$i].'.<br>'); | |
$i++; | |
}while( $i < count($fruits) ) | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$fruits = array('apple', 'mango', 'grape', 'orange'); | |
echo 'For Loop Example <br>'; | |
for($i = 0; $i< count($fruits); $i++){ | |
echo ('I am '.$fruits[$i].'.<br>'); | |
} | |
echo '<hr>'; | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$fruits = array('apple', 'mango', 'grape', 'orange'); | |
echo 'Foreach Loop Example <br>'; | |
foreach($fruits as $fruit){ | |
echo ('I am '.$fruit.'.<br>'); | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$fruits = array('apple', 'mango', 'grape', 'orange'); | |
echo 'While Loop Example <br>'; | |
$i = 0; | |
while( $i < count($fruits) ){ | |
echo ('I am '.$fruits[$i].'.<br>'); | |
$i++; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment