PHP Classes

File: example3.php

Recommend this page to a friend!
  Classes of Alessandro Rosa   anagrams   example3.php   Download  
File: example3.php
Role: Example script
Content type: text/plain
Description: example
Class: anagrams
Generate anagrams from given words
Author: By
Last change: no
Date: 18 years ago
Size: 529 bytes
 

Contents

Class file image Download
<?php

/*

class anagram
-------------
This example shows a faster filtering from
all anagrams, but implementation is a bit
more difficult.

*/

require_once( 'anagram.php' );

$anagrams = new anagram();

$anagrams->insert_word( "picture" );

// insert the base-1 index of the letter
$anagrams->add_bond( 1 ); // letter P
$anagrams->add_bond( 5 ); // letter U
$anagrams->add_bond( 3 ); // letter C

$anagrams->set_save_file( true ) ;
$anagrams->set_save_file_name( "ex3.html" ) ;
$anagrams->go();

?>