1function echo_arr($arr){
2 for ($i=0; $i < count($arr); $i++) {
3 echo $arr[$i];
4 }
5 }
6
7echo_arr($your_array_here);
1<?php
2$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x', 'y', 'z'));
3print_r ($a);
4?>
1$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x', 'y', 'z'));
2print_r ($a);
1<?php
2$cars = array("Volvo", "BMW", "Toyota");
3echo "I like " . $cars[0] . ", " . $cars[1] . " and " . $cars[2] . ".";
4?>