Похожие чаты

<?Php // Keyword:Point $keywords = [ 'lol' => 1,

'rofl' => 2,
'lmao' => 3,
'lel' => 4
];

$text = "omg lol you guys check thsi thread lmao! legit top lel right there bahah look at the guys face oh man lol ";
$words = array_count_values(explode(' ', $text));

$points = 0;
foreach ($keywords as $keyword => $point)
{
if (isset($words[$keyword]))
$points += $point * $words[$keyword];
}

echo $points;

2 ответов

17 просмотров

🙈 thanks man . now it is cristal clear

hey bro, i m trying to solve hackertank problem can you check my code i m trying it for the last 3 hours,but f*ck, no results https://codeshare.io/2Bl61m

Похожие вопросы

Карта сайта