The error may occur when the number of times you iterate the array is greater than the actual size of the array. for example:
$one="909";
for($i=0;$i<10;$i++)
echo ' '.$one[$i];
will show the error.
first case u can take the mod of i.. for example
function mod($i,$length){
$m = $i % $size;
if ($m > $size)
mod($m,$size)
return $m;
}
for($i=0;$i<10;$i++)
{
$k=mod($i,3);
echo ' '.$one[$k];
}
or might be it not an array (maybe it was a value and you tried to access it like an array)
for example:
$k = 2;
$k[0];