hi all..

is it possible to convert this array,
Array
(
[123] => Array
(
[0] => AAA
[1] => BBB
)

[124] => Array
(
[0] => CCC
[1] => DDD
[2] => EEE
)

[125] => Array
(
[0] => FFF
)
)
to this type of array using implode?

Array
(
[123] => AAA, BBB
[124] => CCC, DDD, EEE
[125] => FFF
)

Means i want to implode the array inside an aonther array...Is it possible?

Thanks..

Assume $data is an multi dimensional array.

for($i=0;$i<count($data);$i++)
{
$rs=$data[$i];
}

Now you can implode $rs which is your new array with total elements.

$comma_separated = implode(",", $rs);

Try this....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.