Line break tag in php

Solved
2I++ Posted messages 793 Status Membre -  
 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.
Configuration: Windows XP Firefox 3.0.5

3 réponses

avion-f16 Posted messages 19268 Registration date   Status Contributeur Last intervention   4 511
 
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 return
Welcome 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.
15
Naguez Abderraouf
 
Thank you
0