c'è un errore:
codice:
$cont .= "$k => '$v', ";
è quello corretto