Can functions only be called on the script level in PHP?

Yes, functions can be called at any level within a PHP script, not just at the script level. Functions can be defined and called within other functions, loops, conditions, or any other block of code. Example:

function greet() {
    echo "Hello, ";
}

function sayName($name) {
    echo $name;
}

greet();
sayName("John");