Link to home
Start Free TrialLog in
Avatar of rlb1
rlb1

asked on

How do I fix "Undefined offset: 1"

Experts:

How do I fix a "Undefined offset: 1"?   What exactly is it?   I do not see a visible error in my code...

Thanks for your help!

preg_match('%<tr>\s*<td align="center">\s*<a href="http:\/\/www\.website\.com\/CatList\.asp"><span class="prodListPage_catName">Product Categories<\/span><\/a><span class="prodListPage_catName">\&gt<\/span><a href=".*?"><span class="prodListPage_catName">(.*?)<\/span><\/a><span class="prodListPage_catName">\&gt<\/span><a href=".*?"><span class="prodListPage_catName">(.*?)<\/span><\/a><span class="prodListPage_catName">\&gt<\/span><a href=".*?"><span class="prodListPage_catName">(.*?)<\/span><\/a>\s*<\/span><\/td>\s*<\/tr>%',$buffer2,$matches2001);

    $category = $matches2001[1];     //Undefined offset: 1 here
    $subcategory = $matches2001[2];    //Undefined offset: 2 here
    $subsubcategory = $matches2001[3];     //Undefined offset: 3 here

Open in new window

SOLUTION
Avatar of haloexpertsexchange
haloexpertsexchange
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rlb1
rlb1

ASKER

Thanks for your help!