source <?php //1つ前のサンプルと比較すること! $a = 10; $b = 33; Function test() { global $a; //こっちはグローバル $b = 100; //こっちはローカル echo $a + $b; } test(); ?>