function generateConsonantRegex($consonants, $appendRegex) { $result = ''; for ($i = 0; $i < strlen($consonants); $i++) { $result = $result . '[' . getRelatedConsonants($consonants[$i]) . ']' . $appendRegex; } return $result; }
function generateConsonantRegex($consonants, $repeatNumberRegex) { $result = ''; for ($i = 0; $i < strlen($consonants); $i++) { $result = $result . '[' . getRelatedConsonants($consonants($i)) . ']' . $repeatNumberRegex; } return $result; }