- array_splice: documentation ( source)
- var_export: documentation ( source)
- implode: documentation ( source)
<?php
$array = array(
0 => "a,b",
1 => "c,d",
2 => "e,f",
3 => "g,h",
);
$array[] = implode(",", array_splice($array, -2));
var_export($array);