DEV Community

Discussion on: Daily Challenge #159 - Isogram

Collapse
 
celyes profile image
Ilyes Chouia • Edited

in PHP

// Simple function to detect isogram words in PHP 

function is_isogram($s) 
{
    $s = strtolower($s);
    return count(array_unique(str_split($s, 1))) == strlen($s);
}