PHP join function
The function of the PHP join function is to combine the array elements in the PHP Array into a string, and the effect is the same as the implode function. For example, we store the data retrieved from the database in an array, and output a complete word String, you can use the join function to combine each array element in the array. The PHP join function allows you to set the combined characters yourself. According to the documentation on the PHP official website, the PHP join function is an alias of the implode function, in other words , These two functions are actually the same, but with the development of the PHP version, there is a little difference in the use of parameters between the two. This article focuses on the basic application of the join function.
PHP join function syntax
PHP join function example
$MyArray=array('Welcome','to','Wibibi.');
echo join('',$MyArray).'<br>';
echo join('',$MyArray).'< br>';
echo join('-',$MyArray).'<br>';
?>
Welcome to Wibibi.
Welcome-to-Wibibi.
➤Research on the same function as the PHP join function: PHP implode
Post a Comment
0 Comments