How to convert array of numbers to string in PHP

1 Answer

0 votes
$arr = array(4, 6, 8, 2, 1, 10, 3, 5, 13);
        
$str = implode(" ", $arr);

echo $str;
        



/*
run:

4 6 8 2 1 10 3 5 13

*/

 



answered Oct 15, 2022 by avibootz
...