$key = "id,name";
$val = "'$lastid','$autor'";
...
if ($email){
$key .= ",email";
$val .= ",'$email'";
}
...
$keys = \explode(',', $key);
$vals = \explode(',', $val);
$arr = array_combine($keys,array_fill(0,count($keys),$vals));
....
//O a...
asked by
10.09.2016 / 01:02