Array from matrix fields without quotations I am trying to create an array bodyBlocks by looping through all of my matrix fields called blockTextContent:

$bodyBlocks = [];
foreach ($entry-&gt;getFieldValue('pageBuilder')-&gt;all() as $block){
    switch ($block-&gt;type-&gt;handle) {
        case 'blockText':               
            $bodyBlocks[] = $block-&gt;blockTextContent;
            break;
        }
    }

// Begin defining the response data for this entry
$data = [
    'title' =&gt; $entry-&gt;title,
    'slug' =&gt; $entry-&gt;url,
    'status' =&gt; $entry-&gt;status,
    'textArea' =&gt; $bodyBlocks
];  


The JSON response is as below, focusing on the textArea line. 

"title": "Title Here",
"slug": "slug-here",
"status": "live",
"textArea": [
    "&lt;p&gt;Text from first 1st block&lt;/p&gt;",
    "&lt;p&gt;Text from first 2nd block&lt;/p&gt;",
    "&lt;p&gt;Text from first 3rd block&lt;/p&gt;",
],
"heroBanner": "img.jpg",


The above is working as expected, cool. BUT I'd like the response to appear as below. Merging that matrix field in to one line in textArea, so without the separating quotation marks and surrounding square brackets [ ]? 

My desired response would look like this in the end:

"title": "Title Here",
"slug": "slug-here",
"status": "live",
"textArea": "&lt;p&gt;Text from first 1st block&lt;/p&gt; &lt;p&gt;Text from first 2nd block&lt;/p&gt; &lt;p&gt;Text from first 3rd block&lt;/p&gt;",
"heroBanner": "img.jpg",


Thanks!
You would need to join the array into a string, like so:

// Begin defining the response data for this entry
$data = [
    'title' =&gt; $entry-&gt;title,
    'slug' =&gt; $entry-&gt;url,
    'status' =&gt; $entry-&gt;status,
    'textArea' =&gt; implode(' ',$bodyBlocks)
];