Page 1 of 1

undefined offset

Posted: Wed Nov 06, 2002 7:13 pm
by sad2891
ok now what is an undefined offset and where is it?

Code: Select all

<?php
for ($it=0;$loggerї$it];) {
?>

Posted: Thu Nov 07, 2002 2:14 am
by twigletmac
It's when you're trying to access an array element which doesn't exist.

Eg:

Code: Select all

$array = array(0 => 'x', 1 => 'y', 2 => 'z');
echo $arrayї3];
will give you an offset error as there is no $array[3] defined.

Mac