Login   Register  
PHP Classes
elePHPant
Icontem

File: Kenny.demo.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Nemanja Avramovic  >  Kenny Translator  >  Kenny.demo.php  >  Download  
File: Kenny.demo.php
Role: Example script
Content type: text/plain
Description: Example of usage
Class: Kenny Translator
Translate text to Kenny speech and vice-versa
Author: By
Last change:
Date: 2008-02-09 13:54
Size: 457 bytes
 

Contents

Class file image Download
<?php

//include Kenny class.
require_once("Kenny.class.php");

//create instance of class
$Kenny = new Kenny();

//example of usage: translate normal text to Kenny speech
echo "<p>";
echo 
$Kenny->translate("Oh my God, they've killed Kenny!");
echo 
"</p>";

//example of usage: translate Kenny speech to normal text
echo "<p>";
echo 
$Kenny->translate("Ffmppffmf mmpmmmfmmfmpmmmpffmpmfmm!");
echo 
"</p>";

//destuctor
$Kenny->kill();

?>