Home>

I am studying PHP on the web. It is displayed but as expected
Is not displayed. What is wrong?
Expected display: hi! Tom from $lang
Actual display: hi! $Name from $lang
"Tom" is not in "$name".
What should I do?
I don't know how to do this.
I use winndows10, Notepad ++, Xammp.
Please.

// function
$lang = 'php';
    function sayHi ($name) {
        $lang = 'php';
        echo 'hi! $name from $lang';
    }
    sayHi ('Tom');
    // var_dump ($lang);
?>
php