Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function check($firstStr,$secondStr){
- if (!empty($secondStr)) {
- $secondStr = mb_strtolower(str_replace(' ','',$secondStr));
- $firstStr = mb_strtolower(str_replace(' ','',$firstStr));
- for($i=0 ; $i < iconv_strlen($secondStr); $i++){
- if(substr_count($firstStr,$secondStr[$i]) < substr_count($secondStr,$secondStr[$i])){
- return false;
- }
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement