Advertisement
natalyayemelyanova

Виталий Мотылевский 2

Feb 9th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. function check($firstStr,$secondStr){
  2.  
  3. if (!empty($secondStr)) {
  4. $secondStr = mb_strtolower(str_replace(' ','',$secondStr));
  5. $firstStr = mb_strtolower(str_replace(' ','',$firstStr));
  6.  
  7. for($i=0 ; $i < iconv_strlen($secondStr); $i++){
  8. if(substr_count($firstStr,$secondStr[$i]) < substr_count($secondStr,$secondStr[$i])){
  9.  
  10. return false;
  11. }
  12. }
  13. }
  14. return true;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement