Here Is the Error Message I Get
Warning: array_values() [function.array-values]: The argument should be an array in /home/g2gayan/public_html/users/djneed/onlinegame/includes/functions.php on line 2232
Warning: Wrong parameter count for max() in /home/g2gayan/public_html/users/djneed/onlinegame/includes/functions.php on line 2232
Warning: array_values() [function.array-values]: The argument should be an array in /home/g2gayan/public_html/users/djneed/onlinegame/includes/functions.php on line 2233
Warning: Wrong parameter count for min() in /home/g2gayan/public_html/users/djneed/onlinegame/includes/functions.php on line 2233
Warning: Invalid argument supplied for foreach() in /home/g2gayan/public_html/users/djneed/onlinegame/includes/functions.php on line 2240
I Have Attached my Function PHP and Here is the php coding between lines which erros occured !
$flash_tag_clouds_text = "var so = new SWFObject(\"".TEMPLATE_PATH."/flash_tag_clouds.swf\", \"tagcloud\", \"".$flash_tag_clouds_width."\", \"".$flash_tag_clouds_height."\", \"7\", \"#".$flash_tag_clouds_flashcolor."\"); \n";
if ($flash_tag_clouds_transparent == 'true') {
$flash_tag_clouds_text .= "so.addParam(\"wmode\", \"transparent\"); \n";
}
$flash_tag_clouds_text .= "so.addVariable(\"tcolor\", \"0x".$flash_tag_clouds_textcolor."\");\n";
$flash_tag_clouds_text .= "so.addVariable(\"mode\", \"tags\"); \n";
$flash_tag_clouds_text .= "so.addVariable(\"distr\", \"true\"); \n";
$flash_tag_clouds_text .= "so.addVariable(\"tspeed\", \"".$flash_tag_clouds_textspeed."\"); \n";
$flash_tag_clouds_text .= "so.addVariable(\"tagcloud\", \"<tags>";
$sql = "SELECT i.word_id, i.word_text, COUNT(c.word_id) AS quantity
FROM ".WORDLIST_TABLE." i
LEFT JOIN ".WORDMATCH_TABLE." c ON i.word_id = c.word_id
WHERE keys_match > 0
GROUP BY i.word_text
ORDER BY RAND()
LIMIT $flash_tag_clouds_textlimit";
$result = $site_db->query($sql);
while ($row = $site_db->fetch_array($result)) {
$tags[$row['word_text']] = $row['quantity'];
}
$max_qty = max(array_values($tags));
$min_qty = min(array_values($tags));
$spread = $max_qty - $min_qty;
if ($spread == 0) {
$spread = 1;
}
$step = ($flash_tag_clouds_size_max - $flash_tag_clouds_size_min) / ($spread);
foreach ($tags as $key => $value) {
$size = round($flash_tag_clouds_size_min + (($value - $min_qty) * $step));
// clean keys for flashtext:
$key2 = $key;
$key2 = str_replace('"',' ',$key2);
$key2 = str_replace('&',' ',$key2);
$key2 = str_replace('%',' ',$key2);
$key2 = str_replace('>',' ',$key2);
$key2 = str_replace('<',' ',$key2);
$key2 = str_replace('+',' ',$key2);
//
$flash_tag_clouds_text .= "<a href='".$site_sess->url(ROOT_PATH."search.php?search_keywords=".$key.((!empty($mode)) ? "&mode=".$mode : ""))."' style='".$size."'>".$key2." [".$value."]</a>";
}
return $flash_tag_clouds_text;
}
/*----------------------- End MOD Flash-Tag-Clouds by KW ---------------------*/
can some 1 help me please ? :S
I Think its a Thing Cause Due to SIR KURTS MOD !