funcion within a function
Moderator: General Moderators
-
mccommunity
- Forum Commoner
- Posts: 62
- Joined: Mon Oct 07, 2002 8:55 am
funcion within a function
I have written a function and I have another function that I would like to execute within the first function. Can I do this with functions in php?
Try it and find out......
I've never tried it so I can't give you an answer, but if you are starting to use functions within functions then it might be a good idea to learn how to use Classes instead.
Code: Select all
<?php
function FA()
{
$result = FB();
return $result;
}
function FB()
{
return "Hello";
}
echo(FA());
?>I've never tried it so I can't give you an answer, but if you are starting to use functions within functions then it might be a good idea to learn how to use Classes instead.
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK