You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
<?php
|
|
function is_anagram($a, $b)
|
|
{
|
|
if (count_chars($a, 1) == count_chars($b, 1))
|
|
{
|
|
return "This two strings are anagram";
|
|
}
|
|
else
|
|
{
|
|
return "This two strings are not anagram";
|
|
}
|
|
}
|
|
print_r(is_anagram('anagram','nagaram')."\n");
|
|
print_r(is_anagram('cat','rat')."\n");
|
|
?>
|