Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
<?php
$data = Array(
'date' => '12.01.2017',
'name' => 'John'
);
$res = $data;
array_walk(
$res,
function(&$value, $key) {
$value = $key == 'date' ? "'{$value}'" : $value;
}
);
print_r($res);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question