how to convert array into string php code example
Example 1: Array to String Conversion in PHP
$gadget = array( 'computer', 'mobile', 'tablet' );
echo implode($arr);
Example 2: array to string conversion in php
$person = [
'name' => 'Jon',
'age' => 26,
'status' => null,
'friends' => ['Matt', 'Kaci', 'Jess']
];
echo json_encode($person);
// {"name":"Jon","age":26,"status":null,"friends":["Matt","Kaci","Jess"]}