public function getAllSiteNames() { $sites = array(); foreach ($this->creds as $key => $value) { if (is_array($value) && !empty($value['username']) && !empty($value['password'])) { $sites[] = $key; } } return $sites; }