Answers for "array associative to string php"

PHP
0

array to string php

<?php

$array = array('lastname', 'email', 'phone');
$comma_separated = implode(",", $array);

echo $comma_separated; 

// lastname,email,phone


?>
Posted by: Guest on November-24-2021
0

Convert an Array to a String in PHP

phpCopy<?php
   $array = ["Lili", "Rose", "Jasmine", "Daisy"];
   $JsonObject = json_encode($array);
   echo "The array is converted to the Json string.";
   echo "n"; 
   echo"The Json string is $JsonObject";
?>
Posted by: Guest on April-23-2021

Code answers related to "array associative to string php"

Browse Popular Code Answers by Language