- var_dump: documentation ( source)
- implode: documentation ( source)
<?php
$array = Array
(
'3' => 10,
'2' => 2,
'5' => 'Nakiya',
);
/**
* Implodes an array.
*
* @param array $array The array
* @param string $with What to implode it with
*
* @return String
*/
function implodeArr($array, $with = '')
{
return implode($with, $array);
}
var_dump(implodeArr($array,','));