All pastes #331603 Raw Edit

Unnamed

public text v1 · immutable
#331603 ·published 2007-01-29 00:56 UTC
rendered paste body
function beginsWithVowel($str) {
	$vowels[0] = 'a';
	$vowels[1] = 'e';
	$vowels[2] = 'i';
	$vowels[3] = 'o';
	$vowels[4] = 'u';
	$str2 = strtolower($str);
	if( $str2{0} == $vowels ) {
		return("an");
	} else {
		return("a");
	}
}