$check_robot = check_robot($aaa, $bbb);や、
function escape($ccc);で、下記のようなユーザー定義関数を利用したいんですが、

function escape($string) {
return htmlspecialchars($string, ENT_QUOTES);
}

function check_robot($ua, $is_robot) {
if (preg_match($is_robot, $ua)) {
$check_robot = "robot";
} else {
$check_robot = "norobot";
}
return $check_robot;
}

PHP Fatal error: Call to undefined functionが出ます。
なぜでしょうか?さっぱり解りません。首を釣るべきでしょうか?