CaViCcHi development
Clock
I can make it real!
Interesting piece of code...
/*
* Generate Keywords, args passed as arrays
*
* Array(
* score : int | if over 1 overrule the < 4 length to be considered
* text : chars
* )
*/
function generateKeywords(){
$m=4;
$rs=Array();$nr=Array();
$args=func_get_args();
for($j=0;$j<count($args);$j++){
if($args[$j][0] > 1){$m=3;}else{$m=4;}
preg_match_all("/([a-zA-Z-]{{$m},})/",$args[$j][1],$tmpMatches);
for($k=0;$k<count($tmpMatches[0]);$k++){
if(isset($rs[$tmpMatches[0][$k]])){
$rs[$tmpMatches[0][$k]] += $args[$j][0];
}else{
$rs[$tmpMatches[0][$k]] = $args[$j][0];
}
}
}
arsort($rs);
$g=0;
foreach($rs as $key => $val){
$nr[]=$key;
$g++;
if($g>15) break;
}
return $nr;
}