You have to declare your variable before you're calling a function with your global variable:
$plain = array(
"small" => "3.50",
"medium" => "6.25",
"large" => "8.00"
);
printMenu();
Also maybe you will consider to set this variable as argument in your function. Check this:
function printMenu($argName) {
var_dump($argName);
}
$plain = array(
"small" => "3.50",
"medium" => "6.25",
"large" => "8.00"
);
printMenu($plain);