Location: PHPKode > scripts > YAMC > yamc/example.php
<?php

include_once("class.YAMC.php") ;

//
// Need an object to get everything else to work.
//

$theMailto = new YAMC() ;

//
// Emit the javascript that will process the anchors
// and produce the mailto href.  It doesn't have to
// be the first thing done.
//

$theMailto->javascript() ;

//
// A simple mailto link with the default name.
//

$theMailto->mailto("hide@address.com") ;
print("<br />\n") ;

//
// A mailto with a subject and body.
//

$theMailto->mailto(array('to'=>'hide@address.com', 
			 'subject'=>'Mailto test',
			 'body'=>'Dear Dick,')) ;
print("<br />\n") ;

//
// A mail to with a different link.
//

$theMailto->mailto('hide@address.com', 'Dick Munroe') ;
print("<br />\n") ;

//
// Test the non-object oriented call to javascript.
//

$js =& YAMC::javascript(FALSE) ;
var_dump($js) ;
?>
Return current item: YAMC