convert array of int to array of string php code example
Example 1: Notice: Array to string conversion php
// Use json_encode to collapse the array to json string:
$stuff = array(1,2,3);
print json_encode($stuff); //Prints [1,2,3]
Example 2: Convert an Array to a String in PHP
phpCopy<?php
$array = ["Lili", "Rose", "Jasmine", "Daisy"];
$JsonObject = serialize($array);
echo "The array is converted to the Json string.";
echo "\n";
echo"The Json string is $JsonObject";
?>
Example 3: Convert an Array to a String in PHP
phpCopyserialize($ArrayName);