把数组元素组合为字符串

 

<?php
$arr = array('Hello','World!','I','love','Shanghai!');
echo implode(" ",$arr);
?>


Hello World! I love Shanghai!

posted @ 2019-07-16 13:59  anobscureretreat  阅读(451)  评论(0编辑  收藏  举报