<?php $str = 'a,b,c'; foreach(explode(",", $str) as $key){ $res[$key] = null; } print_r($res);
You have javascript disabled. You will not be able to edit any code.