Re: [PHP] Offset error

2004-07-15 Thread John W. Holmes
C.F. Scheidecker Antunes wrote: Can anyone tell me how to test the offset 1 or more in the array $att[$k]->parameters[1] so that I can avoid this error? if(isset($att[$k]->parameters[1])) { dosomething(); } -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architec

Re: [PHP] Offset error

2004-07-15 Thread Justin Patrin
if(isset($att[$k]->parameters[1])) { //use $att[$k]->parameters[1]->value } or, assuming indexes start at 0 and are sequential: if(count($att[$k]->parameters) > 1) { //use $att[$k]->parameters[1]->value } On Thu, 15 Jul 2004 17:08:16 -0600, C.F. Scheidecker Antunes <[EMAIL PROTECTED]> wrote:

[PHP] Offset error

2004-07-15 Thread C.F. Scheidecker Antunes
Hello, error: PHP Notice: Undefined offset: 1 in /home/ant/test.app/teste3/getfiles.php on line 217 I have this Undefined offset error in PHP because I am trying to get a value from this $att[$k]->parameters[1]->value that sometimes does not exist with offset 1 as the parameters go up to 0 a