Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 2nd, 2004, 04:22 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default newline and tab characters problem

echo "India\tAmerica";
echo "India\nAmerica";

i.e. "\t" and "\n" can't create 'tab' and 'newline' in PHP o/p.
What is wrong ?

__________________
`~@#\^%&*/\.<.\/-|+|_!:;..=?>
PHP, SEO | anshul shrivastava | mediasworks.org | FB
 
Old December 2nd, 2004, 06:58 AM
Authorized User
 
Join Date: Oct 2004
Posts: 84
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to SiliconFuRy
Default

these escape characters put linebreaks and tabs in the outputted text. If ur making this inside an HTML file, look at the source and it will be line-broken.

If you do command line php, they will also be line broken, if ur needing to do it in HTML, use <BR>, and whatever the html is for a tabstop, i cant remember what that is.

Many shoes,

Jamez/SiliconFuRy





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in some characters mmrz Oracle 1 October 18th, 2007 08:02 AM
Replace newline characters thomasjacob XML 1 May 2nd, 2006 04:06 AM
Problem with Newline character d_sathish XSLT 3 November 25th, 2005 07:20 PM
Newline character problem gsudipta1 XML 0 March 16th, 2005 03:54 AM
Getting tab characters to show up in output richard.york PHP How-To 9 November 21st, 2004 03:47 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.