Location: PHPKode > scripts > Ssearch > example.php
<?php
	require('Ssearch.class.php'); //Include the class file

	$Dataset = array(
					array(
						"Testing Search"
						),
					array(
						"Searcheable"
						),
					array(
						"Searching"
						),
					array(
						"Bananas."
					)
				); //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();
	$MySearch->SetScore(1001);
	$MySearch->SetData($Dataset);

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

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

	//Display results
	foreach ($results as $object)
	{
		echo $object[0] . " - " . $object["score"] . "</br>\n";
	}
?>
Return current item: Ssearch