I have a PHP array and want to convert it to a string.
I know I can use join or implode, but in my case array has only one item. Why do I
You could use print_r and html interpret it to convert it into a string with newlines like this:
$arraystring = print_r($your_array, true);
$arraystring = ''.print_r($your_array, true).'
';
Or you could mix many arrays and vars if you do this
ob_start();
print_r($var1);
print_r($arr1);
echo "blah blah";
print_r($var2);
print_r($var1);
$your_string_var = ob_get_clean();