warum-span-ohne-utf8.php


Quell Code


<?php
header ('Content-Type: text/html; charset=utf-8');

    $txtInput ='Dies könnte eine schöne Spaßübung sein.';
    echo "Ausgabe 1<br>";
    for ($i=0; $i<strlen($txtInput); $i++) {
        $char = substr($txtInput,$i,1);
        echo $char;
    }

    echo "<br><br>Ausgabe 2<br>";
    for ($i=0; $i<strlen($txtInput); $i++) {
        $char = substr($txtInput,$i,1);
        echo '<span>'.$char.'</span>';
    }
    
        echo "<br><br>Ausgabe 3<br>";
    for ($i=0; $i<strlen($txtInput); $i++) {
        $char = mb_substr($txtInput,$i,1);
        echo '<div>'.$char.'</div>';
    }
    
    
?>
</body>
</html>


Deprecated: Directive 'allow_url_include' is deprecated in Unknown on line 0
vConsole
08:47:48
Uncaught TypeError: Cannot read properties of null (reading 'style')
/Kurze-Scripte-und-Codeschnipsel/warum-span-ohne-utf8.php:5446:53
08:47:50
Uncaught SyntaxError: Unexpected token '<'
/js/index.php?js=3.2.1-jquery.min.js:4:22481
08:47:50
Uncaught SyntaxError: Unexpected token '<'
/js/index.php?js=MooTools.min.js:5:5095
08:47:50
Uncaught SyntaxError: Unexpected token '<'
/js/index.php?js=EnlighterJS.min.js:3:17773
08:47:50
Uncaught TypeError: window.addEvent is not a function
/Kurze-Scripte-und-Codeschnipsel/warum-span-ohne-utf8.php:2786:8
08:47:50
Uncaught SyntaxError: Unexpected token '<'
/js/index.php?js=pace.js:896:26
08:47:50
Uncaught SyntaxError: Unexpected token '<'
/js/index.php?js=cookieconsent.min.js:1:20809
08:47:50
909
08:47:50
Uncaught SyntaxError: Unexpected token '<'
/js/alljs.php:408:2
08:47:48
WeChatLib: 0 (xxxx.xx.xx)
08:47:50
System: Unknown
08:47:50
Protocol: HTTPS
08:47:50
UA: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
08:47:50
navigationStart: 1737535667654
08:47:50
navigation: 59ms
08:47:50
dns: 162ms
08:47:50
tcp (ssl): 219ms (111ms)
08:47:50
request: 506ms
08:47:50
response: 108ms
08:47:50
domComplete (domLoaded): 1778ms (1662ms)
08:47:50
loadEvent: 40ms
08:47:50
total (DOM): 2768ms (2728ms)