Answers for "print array to string php"

PHP
7

php implode

$arr = array('Hello','World!','Beautiful','Day!');
echo implode(" ",$arr);
// Outputs: 'Hello World! Beautiful Day!'
Posted by: Guest on June-16-2020
0

Convert an Array to a String in PHP

phpCopy<?php   
$arr = array("This","is", "an", "array");  
$string = implode(" ",$arr);  
echo "The array is converted to the string.";
echo "\n";
echo "The string is '$string'";
?>
Posted by: Guest on April-23-2021
0

Convert an Array to a String in PHP

phpCopyimplode($string, $arrayName);
Posted by: Guest on April-23-2021

Browse Popular Code Answers by Language