I am building a seach engine for my website. I was using a very simple method but ran across this link todayhttp://www.roscripts.com/PHP_search_engine-119.html
I have implemented almost everything listed accept the cleaner file I can not get loaded. The line with the error is line 6
<?php
class Cleaner {
var $stopwords = array(" find ", " about ", " me ", " ever ", " each ")//you need to extend this big time.
var $symbols = array('/','\','\'','"',',','.','<','>','?',';',':','[',']','{','}','|','=','+','-','_',')','(','*','&','','%','$','#','@','!','~','`' );//this will remove punctuation
function parseString($find) {
$find = ' '.$find.' ';
$find = $this->removeStopwords($find);
$find = $this->removeSymbols($find);
return $find;
}
function removeStopwords($find) {
for ($i = 0; $i < sizeof($this->stopwords); $i++) {
$find = str_replace($this->stopwords[$i],' ',$find);
}
//$find = str_replace(' ',' ',$find);
return trim($find);
}
function removeSymbols($find) {
for ($i = 0; $i < sizeof($this->symbols); $i++) {
$find = str_replace($this->symbols[$i],' ',$find);
}
return trim($find);
}
}
?>
Can any one help understand why I am recieving this error Parse error: syntax error, unexpected T_VAR, expecting ',' or ';' ?
Thank you in advance for your assistance.