1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Undefined variable

Discussion in 'XenForo Development Discussions' started by DroidHost, Jan 19, 2012.

  1. DroidHost

    DroidHost Well-Known Member

    Undefined variable : photosets
            foreach ((array)$sets['photoset'] as $key => $set) {
    $photosets[$key] = array(
    'id' => $set['id'],
    'title' => $set['title'],
    $Params =  $photosets['0']['id'];
    I am pretty sure that the problem is within this line
    $photosets[$key] = array(
    I think the variable inside the foreach is restricted for it​
    is there anyway to go over it ?
  2. digitalpoint

    digitalpoint Well-Known Member

    Define $photosets. :)

    Before your foreach(), add this:
    $photosets = array();
    DroidHost likes this.
  3. DroidHost

    DroidHost Well-Known Member

    thanks DP
    I did debug it deeper and it turned it was not the problem ..

    Solved ,,,

Share This Page