Login   Register  
PHP Classes

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 Richard Carson  >  Ssearch  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Ssearch
Search and rank text results in an array
Author: By
Last change:
Date: 2011-01-08 19:27
Size: 736 bytes


Class file image Download
require('Ssearch.class.php'); //Include the class file

$Dataset = array(
"Testing Search"
//Example data set (only one text row per object here, but you can have as many as you want
    //Declare and set up search object
$MySearch = new Ssearch();

//Query string
$query "Testing the Search Feature";

//Perform search
$results $MySearch->Search($query);

//Display results
foreach ($results as $object)
$object[0] . " - " $object["score"] . "</br>\n";