I have an array which has multiple arrays inside of like. Here is how it looks like:
Array (
[0] => Array (
[0] => s1
[1] => s2
[2] => s5
[3] => s1
[4] => s25
[5] => s1
[6] => s6
[7] => s6
[8] => s1
)
[2] => Array (
[0] => a2
[1] => a1
[2] => a4
)
[3] => Array ( )
[4] => Array ( )
)
What I'm trying to figure out is how I can turn these multiple arrays into 1 string where is has values from all arrays split with commas $values = "s1,s2,s5.."
I used impode() before but with this type of array, it's not functioning. Another problem in this is empty arrays which i believe can be removed with array_filter().
$destination_array = array_filter($tags_list);
$destination_array = implode(",", $tags_list);
print_r($destination_array);