- mb_convert_encoding: documentation ( source)
- mb_list_encodings: documentation ( source)
- print_r: documentation ( source)
<?php
$strings = ['bl', 'Bl', 'Blog', 'äöü'];
foreach ($strings as &$str) {
$str = mb_convert_encoding($str, 'UTF-8', mb_list_encodings());
}
echo '<pre>' . print_r($strings, true) . '</pre>';