Function to find the number of str2 that can be formed using characters of str1
< ? php function findNumberOfTimes ( $ str1 , $ str2 ) { $ freq = array_fill ( 0 , 26 , NULL ) ; $ l1 = strlen ( $ str1 ) ; $ freq2 = array_fill ( 0 , 26 , NULL ) ; $ l2 = strlen ( $ str2 ) ;