<?php
// Set MIME type for XML grammar fomat
header('Content-type: application/grammar+xml');
//Include sub class
require ('createGrammar.php');
// Create name arrays
$name_array1 = array("Mary", "Paul", "Jake", "Phil", "Elayne", "Dorothy", "Rita");
$name_array2 = array("Skip", "Helen", "Renee", "Vito");
$name_array3 = array("Mark", "Greg", "Stacy", "Lynn");
$name_array4 = array("Chuck", "Scott", "Mike");
// Combine name arrays into one multidimensioanl array
$choices = array($name_array1, $name_array2, $name_array3, $name_array4);
// Create array for return values
$tag_array = array("HR", "Sales", "Marketing", "Security");
// Create new grammar object
$page = new createGrammar;
// Set slot name for return value
$page->setSlot("department");
// Pass arrays to compoundGram function
$page->compoundGram($choices, $tag_array);
?>
|