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 :)

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?

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! :)";

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>?

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.

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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.