I have an array $test
.
print_r($test) :
Array ( [0] => aa
[1] => cc
[2] => bbb )
What is the best method for parse this to get the string:
aa, cc, bbb
I want this string in variable the $parse
.
I have an array $test
.
print_r($test) :
Array ( [0] => aa
[1] => cc
[2] => bbb )
What is the best method for parse this to get the string:
aa, cc, bbb
I want this string in variable the $parse
.
Try using implode()
:
$string = implode(', ', $your_array);