Jump to content

php line break


voip03
 Share

Recommended Posts

I am trying to print invoice.

I have address table and fields are name, street name, county, and postcode.

I want the output like

Name

Address

Count

Postcode

 

My code is

            <textarea id="address">	
		<? echo  nl2br($paypalrow['firstName']."\n"); 
		   echo  nl2br($paypalrow['shipToStreet']."\n");
		   echo  nl2br($paypalrow['shipToCntryCode']."\n");
		   echo  nl2br($paypalrow['shipToZip']."\n");
		?>
		</textarea>

 

my output

ramanan<br />
142 The avunue<br />
GB<br />
NW9 0UN<br 

 

How to remove the '<br/>' from the output?

thank you

Link to comment
Share on other sites

ok, i've tried this and its working. change your code to this.

 

            <textarea id="address">	
		<?php echo $paypalrow['firstName']."\n"; 
		   echo  $paypalrow['shipToStreet']."\n";
		   echo  $paypalrow['shipToCntryCode']."\n";
		   echo  $paypalrow['shipToZip']."\n";
		?>
		</textarea>

 

Link to comment
Share on other sites

ok, i've tried this and its working. change your code to this.

 

            <textarea id="address">	
		<?php echo $paypalrow['firstName']."\n"; 
		   echo  $paypalrow['shipToStreet']."\n";
		   echo  $paypalrow['shipToCntryCode']."\n";
		   echo  $paypalrow['shipToZip']."\n";
		?>
		</textarea>

 

Ummm, hmmmm...

Link to comment
Share on other sites

ok, i've tried this and its working. change your code to this.

 

            <textarea id="address">	
		<?php echo $paypalrow['firstName']."\n"; 
		   echo  $paypalrow['shipToStreet']."\n";
		   echo  $paypalrow['shipToCntryCode']."\n";
		   echo  $paypalrow['shipToZip']."\n";
		?>
		</textarea>

 

Ummm, hmmmm...

thanks to you that i tried out what you actually said. maybe he didnt understand your said o.0
Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.