Page 1 of 1

Undefined offset

Posted: Tue Jun 11, 2002 11:11 am
by HG
how do I fix a problem with Undefined offset???

the line looks like this

if ($record[$recno]):

Posted: Tue Jun 11, 2002 12:08 pm
by Zmodem
chances are, $recno has no value. Make sure it is set to something.

You might also try placing double quotes around $recno.

Thats the best I can do without seeing some code ;)

Posted: Tue Jun 11, 2002 1:42 pm
by volka
it seems quite often that you have problems with your arrays/hashes.
use print_r($name_of_array>); to take a look on it's content to be sure it contains what you are trying to access. if the index is a variable do also print this var.