Guest Posted January 9, 2007 Share Posted January 9, 2007 I need some help with a bit of code. I am trying to use the 'strtoupper' code for the address output on the invoice as alot of people tend to use the lower case with out capital letters at the start of names and it makes the invoice look unprofessional. The code I have is: <tr><td NOWRAP> <?php echo strtoupper(tep_address_format($order->customer['format_id'], $order->customer, 1, '', '<br> ')); ?> </td> </tr> Which gives me (in the sold to box): NAME SURNAME &NBSP;&NBSP;&NBSP;&NBSP;ADDRESS LINE1 &NBSP;&NBSP;&NBSP;&NBSP;ADDRESS LINE2 &NBSP;&NBSP;&NBSP;&NBSP;ADDRESS LINE3 &NBSP;&NBSP;&NBSP;&NBSP;ADDRESS LINE4 How can I overcome this, but still keep the &NBSP's for the spaces (for correct alignment purposes). Link to comment Share on other sites More sharing options...
user99999999 Posted January 9, 2007 Share Posted January 9, 2007 Try changing in functions/general.php, tep_address_format() function All Caps $firstname = tep_output_string_protected(strtoupper($address['firstname'])); or if you want First Letter Caps $firstname = tep_output_string_protected(ucwords(strtolower($address['firstname']))); Link to comment Share on other sites More sharing options...
Guest Posted January 9, 2007 Share Posted January 9, 2007 Try changing in functions/general.php, tep_address_format() function All Caps $firstname = tep_output_string_protected(strtoupper($address['firstname'])); or if you want First Letter Caps $firstname = tep_output_string_protected(ucwords(strtolower($address['firstname']))); Cheers Dave that works. In the same line how do I add a <br> in there, so each new address line starts from a new line? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.