PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $city = 'Ривенделл'; $result = ''; $symbolsWithCounters = array_count_values(mb_str_split($city)); foreach ($symbolsWithCounters as $symbol => $counter) { $result .= $symbol . ':' . str_repeat('*', $counter) . ','; } $result = rtrim($result, ','); echo $result;
Show:  
Copy Clear