473,396 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How can I make my echoed out for break automatically

In my website I am making I have a comment box, and I would like to know how I can get the comment to automatically do a line break instead of going of the page when I echo the comment out form the MySQL data base. Here is and example of the echo statement.

echo '<center>' . '<font color="blue">' . $name . '</font>' . '<br />' . $comment . '<br />' . '</center>' . $date . '<br />';

The "$comment" is what I want to automatically break. Can you help me?
Apr 20 '12 #1
2 1691
echo '<div><center>' . '<font color="blue">' . $name . '</font>' . '<br />' . $comment . '<br />' . '</center>' . $date . '</div>';
Apr 21 '12 #2
echo "<div>".$name."</div>";
echo "<div>".$comment."</div>";
echo "<div>".$date."</div>";
echo "<hr>"; <------ if you wish to make separate comment ....--->
Apr 21 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Martin Lucas-Smith | last post by:
Is there any need to keep the final break in a switch which uses a default at the end? I.e: switch ($data) { case 'foo': # Action break;
37
by: ajay | last post by:
How to make a web page getting refreshed after a given time interval automatically. HTML Code plz. Tx Ajay
2
by: Matt Silberstein | last post by:
Is there a way to have a style that gives me a "paragraph" break automatically. I have a calendar that is vertical on one page and horizontal on the other, but has the same content. If I could...
18
by: Gustaf Liljegren | last post by:
IE does, and I can't remember this used to be a problem in Netscape. I guess someone in the Mozilla team just came up with a Smart Idea about the True Semantics of the Hyphen Minus character. :-(...
0
by: michael | last post by:
On my ASP.NET pages, it seems that _after_ any web or user control - an extra (small) line break or space is inserted automatically right after the Control. This is unwanted since it messes up...
3
by: michael | last post by:
On my ASP.NET pages, it seems that _after_ any web or user control - an extra (small) line break or space is inserted automatically right after the Control. This is unwanted since it messes up...
0
by: robert_payne | last post by:
Hi all, I have a little problem with page breaking on XP IE6. I can force a page break on page 1 where I intend but the subsequent page then breaks automatically where it would have done without...
16
by: matt | last post by:
hello, ive been trying to figure something out, largely thru trial & error. thought perhaps someone else may have knowledge. i have an html table that consists of blocks of related data --...
4
by: dannyboy | last post by:
Hi I'm trying to echo some php into a piece of javascript that checks that the selectedIndex in a given select name is not 0, and gives an alert if this is so: //// <script...
7
by: jeddiki | last post by:
Hi, I am using a function called htmlwrap() which states that it does NOT add a "<br>" to the 70 character line so that it forces a line wrap. ( the script safely wraps long words without...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.