How can a function be called within another function in PHP?

To call a function within another function in PHP, simply use the function name followed by parentheses within the code block of the outer function. This allows you to encapsulate functionality and reuse code more efficiently. Make sure that the inner function is defined before it is called within the outer function to avoid any errors.

function innerFunction() {
    echo "This is the inner function being called.<br>";
}

function outerFunction() {
    echo "This is the outer function.<br>";
    innerFunction();
}

outerFunction();