Skip to content

Instantly share code, notes, and snippets.

@mheadd
Created February 14, 2010 22:13
Show Gist options
  • Save mheadd/304300 to your computer and use it in GitHub Desktop.
Save mheadd/304300 to your computer and use it in GitHub Desktop.
<?php
include('my/local/directory/php-lib/init.php');
function setMessageBlock($id, $logtext, $prompttext) {
$log = <log>*** {$logtext} ***</log>;
$prompt = <prompt>{$prompttext}</prompt>;
return <block name={$id}>{$log}{$prompt}</block>;
}
echo setMessageBlock("B_1", "XHP for VoiceXML is fun.", "Hello world!");
?>
<block name="B_1">
<log>*** XHP for VoiceXML is fun! ***</log>
<prompt>Hello world!</prompt>
</block>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment