How To define and execute a function inside array
for example i have a array
$a="a";
$b="b";
$c="c";
$array=array(
"a"=>$a,
"b"=>$b,
"c"=>function($c){
//do something
return output
}
)
here output should be
Array
(
[a] => a
[b] => b
[c] => "new value of c"
)
but actually i am getting
Array
(
[a] => a
[b] => b
[c] => Closure Object
(
[parameter] => Array
(
[$c] =>
)
)
)
NB: i can define a function outside this and call that function inside but i dont want to do that