You spend 45mins scratching your head at a simple loop that won't stop looping..
should be..

What's your indication that you need to go take a breather?
EDIT: fs.. add one more on my list: 'You have to edit a post 5 or 6 times to get it right..'
Code:
//snippet..
public function getFile ()
{
if ((isset($this->files[$this->filesIndex])) !== false) {
return $this->files[$this->filesIndex];
} else {
$this->filesIndex = 0;
return FALSE;
}
}
Code:
public function getFile ()
{
if ((isset($this->files[$this->filesIndex])) !== false) {
return $this->files[$this->filesIndex++];
} else {
$this->filesIndex = 0;
return FALSE;
}
}
Code:
//use in..
while (($file = $dir->getFile()) !== false) {
//blah..
}

What's your indication that you need to go take a breather?
EDIT: fs.. add one more on my list: 'You have to edit a post 5 or 6 times to get it right..'

Last edited: