convert numeric array to string array php

90

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";
?>
$integerIDs = array_map('intval', explode(',', $string));
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'";
?>

Comments

Submit
0 Comments