Calling a function inside a function...?
Posted: Fri Mar 03, 2006 6:12 am
Is it possible to call a function inside another function?
For example, i call a function from script1.php...
the function i call processes some calculations on some values, now in this function i call another function to do some more calculations with the new variables...
However i cant get that to work, error message reads "Fatal error: Call to undefined function..." even though i have declared the 2nd function in the first functions script...
The code... (1st function called from another script)
Is this possible?
Thanks
For example, i call a function from script1.php...
the function i call processes some calculations on some values, now in this function i call another function to do some more calculations with the new variables...
However i cant get that to work, error message reads "Fatal error: Call to undefined function..." even though i have declared the 2nd function in the first functions script...
The code... (1st function called from another script)
Code: Select all
<?php
include ("function.php");
function conversions($somevariables, $somevariables2, $somevariables3....)
{
// does some calculations on the $somevariables...
//and then i want to call the function below passing it the new variables ive just calculated...
$values = function($somevariables, $somevariables2, $somevariables3....));
}
?>Thanks