Jump to content

php line break


voip03

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
https://forums.phpfreaks.com/topic/244696-php-line-break/
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
https://forums.phpfreaks.com/topic/244696-php-line-break/#findComment-1256851
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
https://forums.phpfreaks.com/topic/244696-php-line-break/#findComment-1256858
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
https://forums.phpfreaks.com/topic/244696-php-line-break/#findComment-1256861
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.