1--TEST-- 2Test join() function : basic functionality 3--FILE-- 4<?php 5echo "*** Testing join() : basic functionality ***\n"; 6 7// Initialize all required variables 8$glue = ','; 9$pieces = array(1, 2, 3, 4); 10 11// pieces as array with numeric values 12var_dump( join($glue, $pieces) ); 13 14// pieces as array with strings values 15$glue = ", "; // multiple car as glue 16$pieces = array("Red", "Green", "Blue", "Black", "White"); 17var_dump( join($glue, $pieces) ); 18 19// pieces as associative array (numeric values) 20$pieces = array("Hour" => 10, "Minute" => 20, "Second" => 40); 21$glue = ':'; 22var_dump( join($glue, $pieces) ); 23 24// pieces as associative array (string/numeric values) 25$pieces = array("Day" => 'Friday', "Month" => "September", "Year" => 2007); 26$glue = '/'; 27var_dump( join($glue, $pieces) ); 28 29echo "Done\n"; 30?> 31--EXPECT-- 32*** Testing join() : basic functionality *** 33string(7) "1,2,3,4" 34string(30) "Red, Green, Blue, Black, White" 35string(8) "10:20:40" 36string(21) "Friday/September/2007" 37Done 38