ruslanashaari
9/10/2017 - 3:01 PM

Determine if a word or phrase is an isogram.

Determine if a word or phrase is an isogram.

<?php

function isIsogram($phrase){

	$array_phrase = str_split(strtolower(preg_replace('/[\s-äöü]/', '', $phrase)));

	return count($array_phrase) == count(array_unique($array_phrase));
}