If your array consists of numbers, you can use array_sum to calculate a total. Example from the manual:
$a = array(2, 4, 6, 8);
echo "sum(a) = " . array_sum($a) . "
";
If your array consists of strings, you can use implode:
implode(",", $array);
it would turn an array like this:
strawberries
peaches
pears
apples
into a string like this:
strawberries,peaches,pears,apples
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…