Line break tag in php
Solved
2I++
Posted messages
793
Status
Member
-
Naguez Abderraouf -
Naguez Abderraouf -
Hello,
I'm looking for the tag to create a line break in PHP. I tried <br/>, but there is still an error.
Thank you for your help.
I'm looking for the tag to create a line break in PHP. I tried <br/>, but there is still an error.
Thank you for your help.
Configuration: Windows XP Firefox 3.0.5
3 answers
-
Stop confusing PHP with HTML.
PHP is used to generate HTML and the browser interprets the returned HTML.
So if you do:<?php echo 'Welcome to my site!<br/>'; echo 'Cool :)'; ?>
The server will returnWelcome to my site!<br/>Cool :)
If you want there to be a line break after your <br/> in the source code:<?php echo 'Welcome to my site!<br/>'."\n"; echo 'Cool :)'; ?>
--
Your computer does not do what you want... but what you tell it to do.