- implode: documentation ( source)
<?php
$w = 2000;
$h = 5000;
$height = 1500;
$width = ($w/$h)*$height;
echo $width.'x'.$height;
$tab = array(array('test' =>'toto','a'=>'plop'), array('test' =>'toto2','a'=>'plop2'));
foreach($tab as $key => $value) {
$tab[$key] = implode(',',$value);
}
echo '('.implode('),(',$tab).')';