-1

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.

1

1 Answer 1

5

Try using implode():

$string = implode(', ', $your_array);
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.