[SOLVED] creating module - can't see my functions
Posted: Thu Jul 31, 2008 2:22 pm
I'm developing my first module using the documentation and skeleton module as a reference. I'm using a one-file approach with one .module.php file. All was going well until I tried to bundle some of my code in a function. So I have something like
This arrangement gives me
Fatal error: Call to undefined function myfunction()
Can anyone explain why?
Code: Select all
function myfunction()
{
return "myfunction";
}
function DoAction($action, $id, $params, $returnid=-1)
{
.
.
.
if ($action == 'addproduct')
{
$x=myfunction();
}
.
.
.
}
Fatal error: Call to undefined function myfunction()
Can anyone explain why?