0

Hey.

I'm having an annoying problem, that I can't seem to figure out.

In my page when I echo long messages, I do an in-code linebreak at around 100th character, to keep at all in my view.

But when I do that I also get the line breaks and indents on my webpage.
Can I do something? Some PHP setting? Hopefully the solution isn't having ~1000 character long lines.

Thank you :)

4
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by almostbob
0

Hey.

I'm having an annoying problem, that I can't seem to figure out.

In my page when I echo long messages, I do an in-code linebreak at around 100th character, to keep at all in my view.

But when I do that I also get the line breaks and indents on my webpage.
Can I do something? Some PHP setting? Hopefully the solution isn't having ~1000 character long lines.

Thank you :)

Could you post the code here?

0

Well it's like everywhere. Here's an example anyway:

echo "<h1>Edit Page</h1><p>Here you are allowed to edit your personal page, \"",
        $array["page"], "\", in all sorts of ways. You can start out by
        choosing a background color, and what font you would like.<br />
        In that way you can make a completely unique page, that is like no others.<br />
        Have fun! :)";

Edited by Excizted: n/a

0

If you place <br> it will always break your line in browser. If your aim is readablility then why don`t you simply press enter key where ever you want to break your line for your view, instead of typing <br>?

0

I know <br /> is a linebreak. That's where I wan't linebreaks. I don't want to make linebreaks in my IDE, and have those linebreaks happen on my webpage. Some lines may be hundreds of characters long, because I want the design to break the long lines as needed.

I'm sure this has not always been the case, as I remember, 7 years ago when I started webprogramming, I was quite annoyed that there didn't appear linebreaks when I pressed enter in my notepad.

0
echo <<<END
<h1>Edit Page</h1><p>Here you are allowed to edit your personal page, 
$array["page"], 
in all sorts of ways. You can start out by
choosing a background color, and what font you would like.
In that way you can make a completely unique page, that is like no others.
Have fun! :)
END;

text as entered
might not be following the problem correctly?

Edited by almostbob: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.