Whats wrong with this code?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jeeep
Forum Commoner
Posts: 57
Joined: Fri Apr 28, 2006 1:43 am

Whats wrong with this code?

Post 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);
?>
Last edited by jeeep on Sun Oct 22, 2006 2:22 pm, edited 1 time in total.
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post 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
jeeep
Forum Commoner
Posts: 57
Joined: Fri Apr 28, 2006 1:43 am

Post by jeeep »

ah ty bud, have to check into those.
Post Reply