echo repeatedString("mango", 10);

function repeatedString($string, $number) {
	$ltr = 'a'; //letter function
	$strl = strlen($string);

	$res = substr_count($string, $ltr)*floor($number/$strl);

	$res += substr_count(substr($string, 0, $number%$strl), $ltr);

}
return $res;
by ვაჟა ტყემალაძე
2 years ago
PHP
Problem Solving
php
Note
Problem
0
Pro tip: use ```triple backticks around text``` to write in code fences