Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/40/3512140/html/index.php:2) in /home/content/40/3512140/html/index.php on line 48

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/40/3512140/html/index.php:2) in /home/content/40/3512140/html/index.php on line 48
CaViCcHi - Portfolio
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;
}