php echo array

Solutions on MaxInterview for php echo array by the best coders in the world

showing results for - "php echo array"
Emilie
18 Sep 2018
1function echo_arr($arr){
2        for ($i=0; $i < count($arr); $i++) { 
3                echo $arr[$i];
4            }
5        }
6
7echo_arr($your_array_here);
Santino
20 May 2018
1<?php
2$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x', 'y', 'z'));
3print_r ($a);
4?>
Alonso
01 Feb 2019
1foreach($results as $result) {
2	echo $result . '<br>';
3}
Anna
08 Jun 2020
1$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x', 'y', 'z'));
2print_r ($a);
Niclas
11 Jun 2016
1<?php
2$cars = array("Volvo", "BMW", "Toyota");
3echo "I like " . $cars[0] . ", " . $cars[1] . " and " . $cars[2] . ".";
4?>
Elisa
21 Mar 2020
1$String = implode(",", $Array);