Have you lookef in the PHP manual at the various string functions. Also https://stackoverflow.com/questions/21691810/using-php-write-an-anagram-function
Oct 16, 2022
8
Level 1
PHP - Find all anagram between 2 strings
Hello i need to write a class with an anagram function inside.
Verify that the anagram of a string is inside another string. Write a function:
public function anagramm(string $a, string $b): boolean {}
The function has to check that the string a is any anagram of b. The function must return true if it's an anagram, false if it's not. Assume that it's also case sensitive.
Example
Strings: A = "abc" and B = "abcdebacb" , the function will return true, because you can find the anagrams 'abc', 'bac', 'acb' in string B.
Thanks for help!
Please or to participate in this conversation.