Calling a Function Dynamically : Dynamic Function « Functions « PHP
- PHP
- Functions
- Dynamic Function
Calling a Function Dynamically
<html>
<head>
<title>Calling a Function Dynamically</title>
</head>
<body>
<div>
<?php
function sayHello() {
print "hello<br />";
}
$function_holder = "sayHello";
$function_holder();
?>
</div>
</body>
</html>
Related examples in the same category