View Single Post
ישן 30-06-08, 16:22   # 3
kfir91
חסום
 
מיני פרופיל
תאריך הצטרפות: Apr 2007
הודעות: 220

kfir91 לא מחובר  

אז איך מטפלים בזה ?
קוד:
	$vv=$poll_alts[$i]['votes']/(($num_votes==0)?1:$num_votes);  //the part of the total votes for this alternative
	echo "<TR>\n";  //prints a new line in the table
   echo "\t<TD width=25% align=\"right\">".($i+1).". ".$poll_alts[$i]['alternative']."</TD>\n";  //prints the alternative
   echo "\t<TD width=75% align=\"right\"><NOBR><IMG src=\"".$poll_bars[$i%$j]."\" width=".(integer)($vv*80)."% height=15> ".round($vv*100)."% (".$poll_alts[$i]['votes'].")</NOBR></TD>\n";  //prints the bar to demonstrate the percent of the alternative
   echo "<TR>\n";