lillop
12-12-2007, 12:17
Salve, ho bisogno che qualche anima pia mi spieghi quest'esercizio.
Ok per la prima funzione che si richiama con apples()
<?php
$function_variable = "apples";
$function_variable();
$function_variable = "oranges";
$function_variable("In oranges() now.");
$function_variable = "bananas";
$function_variable("In bananas() now.");
function apples()
{
echo "In apples() now.<BR>";
echo "We have plenty of apples.<BR><BR>";
}
function oranges($argument)
{
echo "$argument <BR>";
"We have plenty of oranges also.<BR><BR>";
}
function bananas($argument="")
{
echo "$argument <BR>";
echo "Well stocked on bananas too.<BR><BR>";
}
?>
Ok per la prima funzione che si richiama con apples()
<?php
$function_variable = "apples";
$function_variable();
$function_variable = "oranges";
$function_variable("In oranges() now.");
$function_variable = "bananas";
$function_variable("In bananas() now.");
function apples()
{
echo "In apples() now.<BR>";
echo "We have plenty of apples.<BR><BR>";
}
function oranges($argument)
{
echo "$argument <BR>";
"We have plenty of oranges also.<BR><BR>";
}
function bananas($argument="")
{
echo "$argument <BR>";
echo "Well stocked on bananas too.<BR><BR>";
}
?>