Page 1 of 1

Whats wrong with this code?

Posted: Sun Oct 22, 2006 1:59 pm
by jeeep
I get this error: "Parse error: parse error, unexpected T_STRING, expecting ')' in xxxxx.php on line 255" and since the code isnt that long I exspect a bracket not to be closed. Here is the code, the problem I think is down at the bottom:

Code: Select all

<?php
                                                                



arsort($total_ratio); 

$y = 10;
 
for($i = 0; $i < count($name); $i++)
{ 
	imagestring($im, $font, 10, $y ,  $i + 1 . ". " . $name[$i] . $fake, $red); 
	imagestring($im, $font, 140, $y , $kills[$i], $red);  
	imagestring($im, $font, 210, $y , $deaths[$i], $red);  



if (
   $row = each($total_ratio)) {  
 imagestring($im, $font, 260, $y ,   "  $row[value][$i]  " , $white);   }
 
	  
	$y += 15;
}

 $path = 'makes.png';

imagepng($im, $path);
imagedestroy($im);
?>

Posted: Sun Oct 22, 2006 2:07 pm
by Zoxive
Run it threw a Synax Highlighter, and you would find out that.......

Code: Select all

"bolt"=> '"$bolt_KD" ,
is causing the error....

theres a ' before the "

I also noticed you never close your for loop.

-NSF

Posted: Sun Oct 22, 2006 2:21 pm
by jeeep
ah ty bud, have to check into those.