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
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:
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
3 matches
Mail list logo