You get an notice when you try to use an variable which you haven't initialized yet. Though a notice isn't really important, it usually is an indication that your script isn't working like you want it to work. A well written script is ALWAYS notice (and error) free.
Besides this, your script looks a bit weird. For example, in your 'Tab' class constructor you have an foreach loop with an return statement. A return statement always terminates your loop so your foreach loop will never loop more than once.
Second, you loop through your array getting the array variables like this:
foreach ($this->second as $something)
This is correct, however on the next line you try to return a value in the array like this
return $this->second[$something];
This doesn't make sense. You first retrieve the value and then you want to return another value from the same array (which of cource hasen't been initialized). I think your code should be:
return $something;
If you want to have both the array key as the array value in you loop, your foreach should look like this:
foreach ($this->second as $key => $something) {
return $this->second[$key]; // Is exactly the same as return $something;
}
I suggest you read some more on (associative) arrays, because this is very basic stuff and it will all become clear once you get the hang of it.
Good luck,
Marvin