I have an array that has values in some indexes now what i want to do is to change all values inside array to specific value for example 0, so how can i do that without looping i used bellow code but has syntax error, i don't know what is the syntax error here.
$my_array = array(
'cen12' => 0,
'cen67' => 1,
'cen44' => 5
);
$out_pot = array_map(function ($val){return 0;},$my_array);
Thanks for help!