Hi there,
I'm trying to remove a value from an array. I seem to think unset is the right tool.. so anyhow, the following is what I'm using:
function kda_stopwords() {
$fopen = fopen("modules/shops/kdawords.txt", "r");
$fsize = filesize("modules/shops/kdawords.txt");
$fread = fread($fopen, $fsize);
$words = explode("\n", $fread);
foreach($words as $key) {
if(in_array($key, $this->termnames)) {
unset($this->termnames[$key]);
}
}
}
Everything works fine... and it finds the stopwords in the array (I've checked that) - anyhow... when it comes to the unset command I've used... it doesn't work. The value remains there?
Any ideas.
Thanks,
Chris Evans