Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of NaiFPHP  >  Find Words  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example class
Class: Find Words
Highlight words using a given character set
Author: By
Last change:
Date: 7 years ago
Size: 1,847 bytes
 

Contents

Class file image Download
<?
/************************************************************************
=========================================================
| @ Class Name              : FindWords
| @ Version                 : 1.0
| @ Description             : finding the words by your language ...
| @ All rights reserved to  : NaiF PHP
| @ Created In              : 24-07-2007
| @ Support Site            : http://www.naifphp.org
=========================================================
**************************************************************************/

include "FindWords.class.php";

echo 
"<pre>";

$EnAlphabet = array(" ","-","+","*","&","a",
                  
"b","c","d","e","f","g",
                  
"h","i","j","k","l","m",
                  
"n","o","p","q","r","s",
                  
"t","u","v","w","x","y",
                  
"z","B","C","D","E","F",
                  
"G","H","I","J","K","L",
                  
"M","N","O","P","Q","R",
                  
"S","T","U","V","W","X",
                  
"Y","Z");


$text "     this is a new class ";

//
// FindWords([alphabet by your language], [your text], [color 2 FindWords ( 0 : all , 1 : true , 2 : false)]
//
$obj = new FindWords ($EnAlphabet$text);

echo 
"<h2>Example [1] : </h2>";

print_r ($obj->Finding());



echo 
"<hr>";



$ArAlphabet = array(
                   
"","","","","","","","" ,"",
                   
"","","","","","","","" ,"",
                   
"","","","","","","","","",
                   
"","","","","","","","","",
                   
"","",""," ");


$text "   , hello naif ";

$obj = new FindWords ($ArAlphabet$text);

echo 
"<h2>Example [2] : </h2>";

print (
$obj->Finding());

echo 
"<hr><br><br>",highlight_file(__FILE__,true);

?>