<?php $text_in_preloader = get_field('preloader_text'); $text_in_arr = str_split($text_in_preloader); ?>
<?php if ($text_in_arr): ?>
<ul class="preloader">
<?php foreach ($text_in_arr as $letter): ?>
<li><?php echo $letter; ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
function mb_str_split( $string ) {
return preg_split('/(?<!^)(?!$)/u', $string );
}