<?php function foo($text = "Bar") { echo "\r\n$text"; } // Pass the function to the array. Do not use () here. $array = array( 'func' => "foo" ); // And call it. $array['func'](); // Outputs: "Bar" $array['func']("Foo Bar"); // Outputs: "Foo Bar"
You have javascript disabled. You will not be able to edit any code.