Lab # 3
FUNCTIONS
2. Write PHP Script to demonstrate use of associative arrays for FOR EACH loop execution.
Lab-3-2-foreach.php
<?php $name=array('one'=>'John', 'two'=>'Jane', 'three'=>'marry', 'four'=>'sam'); foreach($name as $values){ echo $values.'<br>'; } ?>
Output
foreach loop in php by Practical Server |
Happy Coding :)
0 Comments
Post a Comment