Location: PHPKode > scripts > KnowMore > knowmore/knowmoredemo.php
 * This is a script that shows off the KnowMore class.

$w = new KnowMore();

if ($_GET['select'])
	list( $url, $name ) = $w->select($_GET['select']);
	print "<a href='http://knowmore.org$url'>$name</a>";

if ($_POST['text'])
	$output = $w->knoWiki( $_POST['text'] );
	print $output;

This form searchs the database for a company.  Near matches work.
It uses the select() method.
	Search: <input type="text" name="select">
	<input type="submit">


This field can convert text with [braces] around company names into linked text.  It's useful if you want to 
link your content to knowmore.org.  It uses the knoWiki() method.
<form method="POST">
	<textarea name="text" rows="4" cols="40">[McDonalds], [Yum], [Pepsi], [Coca Cola], [Ford], [General Motors], and [Sears].</textarea>
	<input type="submit" value="Link Up">

This is a listing of the entire database.  It's done completely in javascript, and shows off the asJsArray() method.
<script type="text/javascript">
KnowMoreDb = <?=$w->asJsArray()?>

for( i=0; i < KnowMoreDb.length; i++ )
	name = KnowMoreDb[i][0];
	url = KnowMoreDb[i][1];
	document.write( '<a href="' + url + '">' + name + '</a><br>' );

Return current item: KnowMore