word .= $this->consonants[array_rand($this->consonants)]; $const_or_vowel = 2; break; case 2: $this->word .= $this->vowels[array_rand($this->vowels)]; $const_or_vowel = 1; break; } if (strlen($this->word) >= $length) { $done = true; } } $this->word = substr($this->word, 0, $length); if ($lower_case) { $this->word = strtolower($this->word); } else if ($ucfirst) { $this->word = ucfirst(strtolower($this->word)); } else if ($upper_case) { $this->word = strtoupper($this->word); } return $this->word; } } ?>