View Single Post
 
Old January 13th, 2004, 03:27 PM
ss2003 ss2003 is offline
Authorized User
 
Join Date: Dec 2003
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default ImageLine Undefined offset error

I have a problem with my index. I have two arrays, one for the x coordinates $ld(), and one for the y coordiantes $la(). I want to draw lines betwween my points but I get an error message when ever I put in the $i+1 for the index of the second point.
Here's the code:

1400 for ($i = 0; $i < 1293; $i++) {
1401 ImageLine($im, $ld[$i], $la[$i], $ld[$i+1], $la[$i+1], $white);
1402 }

Here's the error:

<br />
<b>Notice</b>: Undefined offset: 1293 in <b>C:\Program Files\Abyss Web Server\htdocs\Test7.php</b> on line <b>1401</b><br />
<br />
<b>Notice</b>: Undefined offset: 1293 in <b>C:\Program Files\Abyss Web Server\htdocs\Test7.php</b> on line <b>1401</b><br />
‰PNG
IHDRXXÃpO PLTE (blah, blah, blah...)

What am I doing wrong?

Thanks!