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

Undefined variable

DroidHost

Well-known member
#1
Undefined variable : photosets
PHP:
        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 ?