Assiociative array reducer with array_walk in PHP

Input :

<?php
$array = [
  'date_from' => '2018-01-01',
  'date_to' => '2018-12-31'
]

Expected Output :

>>> "&date_from='2018-01-01'&date_to='2018-12-31'"

Function :

<?php
array_walk($array, function($key, $val) use(&$result) {
  $result .= "&$key='$val'";
});

echo $result