How To Turn An Array To String

Sep 06, 2013, by admin

If you explode to go one way, then you implode to come back the other way (or use join if you want to type less characters).

Just use the delimiter as the first argument and the array as the second.

Here we go:

<?php

$myarray = array(“I”,”love”,”close”,”up”);

$mystring = implode(” “, $myarray);

echo “$mystring”; //I love close up

?>

To get more updates like the page Bugtreat Technologies