Exécuter
❯
Exécuter le code
Ctrl+Alt+R
Changer d'orientation
Ctrl+Alt+O
Changer de thème
Ctrl+Alt+D
<!DOCTYPE html> <html> <body> <h2>La fonction trim()</h2> <?php $x = " Bonjour le monde! "; echo trim($x); ?> <p>Les espaces blancs sont invisibles en HTML brut,<br> but check out the difference in two input fields:</p> <?php echo "<input value='" . $x . "'>"; echo "<br>"; echo "<input value='" . trim($x) . "'>"; ?> </body> </html>
La fonction trim()
Bonjour le monde!
Les espaces blancs sont invisibles en HTML brut,
but check out the difference in two input fields: