Forums / Templates, Stylesheets, Page Layout / Text format in PHP? How to add a line break?

Text format in PHP? How to add a line break?

Locked

Started by dmwizzard on 28 Jul 2006, 6:12 PM · Views: 6,408

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
28 Jul 2006, 6:12 PM
#1
dmwizzard avatar

dmwizzard

New Zenner

Join Date:
Jun 2006
Posts:
25
Plugin Contributions:
0

Text format in PHP? How to add a line break?

Hi all,

I've been trying and trying to add a line break to a line of code....
How do i format a line of PHP to add a line break so i can split a line of text on to the next line... E.G.

This line:

define('TEXT_LOGIN_ERROR', 'Error: Sorry, there is no match for that email address and/or password.');

Gives:

Error: Sorry, there is no match for that email address and/or password.

But I want:

Error: Sorry, there is no match for that email address
and/or password.

What should this line look like to do that?
define('TEXT_LOGIN_ERROR', 'Error: Sorry, there is no match for that email address and/or password.');

This is not the text i want to split - Just using it as an example. I have loads of text that needs this sort of formatting.

Cheers :thumbsup:

28 Jul 2006, 6:15 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Text format in PHP? How to add a line break?

umm ... we made it really complex to do this ...

define('TEXT_LOGIN_ERROR', 'Error: Sorry, there is no match for that email address<br />and/or password.');

Evil eh? :cool:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 Jul 2006, 6:29 PM
#3
dmwizzard avatar

dmwizzard

New Zenner

Join Date:
Jun 2006
Posts:
25
Plugin Contributions:
0

Re: Text format in PHP? How to add a line break?

As easy as that...

I can start putting my Hair back in now...LOL

Many thanks for lightning fast reply. :thumbsup:

28 Jul 2006, 6:30 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Text format in PHP? How to add a line break?

Most welcome ... glad to get you back on track ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

28 Jul 2006, 6:34 PM
#5
dmwizzard avatar

dmwizzard

New Zenner

Join Date:
Jun 2006
Posts:
25
Plugin Contributions:
0

Re: Text format in PHP? How to add a line break?

Is there a list of operators for these commands in PHP?
I'd like Underlines, Bolds, etc...

saves us typing all these requests for individual changes!

28 Jul 2006, 6:38 PM
#6
dmwizzard avatar

dmwizzard

New Zenner

Join Date:
Jun 2006
Posts:
25
Plugin Contributions:
0

Re: Text format in PHP? How to add a line break?

No worries... I just found them all in Dreamweaver!!!!

28 Jul 2006, 6:39 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Text format in PHP? How to add a line break?

More or less if you can do it in html you can do it in a define ...

Make a file called test.php

<?php
echo 'I am test.php<br />';

echo 'I am <strong>bold</strong><br />';

define('I_AM_A_CONSTANT', 'I am the <strong>text</strong> in the constant<br />');

echo I_AM_A_CONSTANT;

?>

Use it to experiment with what you can use ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!