in reply to Re: Converting an index record array into a comma-separated array.
in thread Converting an index record array into a comma-separated array.

$array[@array -1]="";
doesn't remove a trailing comma. What it does is replacing the last element of the array with an empty string.

It's much better to not use an explicite loop, but to use join. Then you don't have to remove any trailing commas either.

Abigail