I want to print like
'id'='1', 'name'='Ravi', 'email'='test@gmail.com'
And I have array like
$input = array(
'id' => 1,
'name' => 'Ravi',
'email' => 'test@gmail.com',
);
$output = implode(', ', array_map(
function ($v, $k) { return sprintf("'%s'='%s'", $k, $v); },
$input,
array_keys($input)
));
print_r(
'id'='1', 'name'='Ravi', 'email'='test@gmail.com'
$output
); // it will result as
0 comments: