static function getWords($string, $lowercase = false) {

		$string = self::clean($string, ' ');

		// before an upper and a lower. FBar -> F Bar
		$string = preg_replace('/(.)([A-Z])([a-z])/', '$1 $2$3', $string);

		// between a lower and an upper. fooB -> foo B
		$string = preg_replace('/([a-z])([A-Z])/', '$1 $2', $string);

		// after any sequence of numbers.  45times -> 45 times
		$string = preg_replace('/([0-9])([^0-9])/', '$1 $2', $string);

		if ($lowercase) {
			$string = strtolower($string);
		}

		do {
			$string = str_replace('  ', ' ', $string, $count);
		} while ($count > 0);

		return explode(' ', $string);
	}
static function getWords($string, $lowercase = false) {

		$string = self::clean($string, ' ');

		// before an upper and a lower. FBar -> F Bar
		$string = preg_replace('/(.)([A-Z])([a-z])/', '$1 $2$3', $string);

		// between a lower and an upper. fooB -> foo B
		$string = preg_replace('/([a-z])([A-Z])/', '$1 $2', $string);

		// after any sequence of numbers.  45times -> 45 times
		$string = preg_replace('/([0-9])([^0-9])/', '$1 $2', $string);

		if ($lowercase) {
			$string = strtolower($string);
		}

		do {
			$string = str_replace('  ', ' ', $string, $count);
		} while ($count > 0);

		return explode(' ', $string);
	}
static function getWords ( $ string , $ lowercase = false ) { $ string = self :: clean ( $ string , ' ' ) ; // before an upper and a lower. FBar -> F Bar $ string = preg_replace ( '/(.)([A-Z])([a-z])/' , '$1 $2$3' , $ string ) ; // between a lower and an upper. fooB -> foo B $ string = preg_replace ( '/([a-z])([A-Z])/' , '$1 $2' , $ string ) ; // after any sequence of numbers.  45times -> 45 times $ string = preg_replace ( '/([0-9])([^0-9])/' , '$1 $2' , $ string ) ; if ( $ lowercase ) { $ string = strtolower ( $ string ) ; } do { $ string = str_replace ( '  ' , ' ' , $ string , $ count ) ; } while ( $ count > 0 ) ; return explode ( ' ' , $ string ) ; }
Returns array of the words in a string
@param string $string
@return array
Returns array of the words in a string