PHP line breaks

Hey Guys!
A small but annoying problem i am having. Im just trying to add a line break between these shipping options instead of using

. The

makes the gap between the lines to big. Current code:

echo ‘

Australian Delivery

’;
echo ’

Australian Standard – $8.25


Australian Express – $13.50


Free Standard Postage on Orders over $100

International Delivery

International Standard – $25.00

Free Standard Shipping on Orders over $200

';

Many Thanks!!

Have you thought of using a table? Tables are frown upon when they are used to make the whole website, but they are good when you have data. That is what it looks like in your case, then you can simply control the line spacing with CSS.

Sometimes new programmers do not realize that they can use CSS just about anywhere!
Just use it in your

tags.

Try:

or set it exactly with:


One drops the line spacing to less than the default, one locks it into one size only.

Am I missing something or is the break tag not in order here?

Table? CSS? Is that really you [member=57087]Strider64[/member] and [member=43746]ErnieAlex[/member]?

[php]
echo '

Australian Delivery


Australian Standard – $8.25

Australian Express – $13.50

Free Standard Postage on Orders over $100

International Delivery

International Standard – $25.00
Free Standard Shipping on Orders over $200'; [/php]

Capture2.JPG

Yes, that’s a good quick fix I suppose. However, one can use one can use
but thy
isn’t easily changeable as one can do with CSS. :wink: There are many way to skin a cat with HTML/CSS, one could even probably do that with lists. I personally avoid
for 99 percent of the time for web pages usually change in looks. Widths become bigger or smaller is just one example.

A good place to practice CSS and see other amazing designs is : http://www.csszengarden.com/

[member=57087]Strider64[/member] , Thanks for the link. I will check it out.

As the op stated, his concern was how big the gap between lines of shipping data was with the

tag. A break tag is the simplest answer to that. I have never, ever found the need to format a break tag. It just does what it does, creates an html line break. I was just a bit surprised that tables or CSS was mentioned.

Heck line-spacing could even be fix in

tag by inserting a class

for example.
https://jsfiddle.net/Strider64/tLwr06o3/1/

This is true. I am reminded of the post I made to see how many ways we could output “Hello World” in Php. I think it ended up being over a hundred. But lets not forget our mantra KISS. (For those that dont know it, Keep It Simple Stupid.)

Sponsor our Newsletter | Privacy Policy | Terms of Service