hey all,
can anybody help me regarding "\t" bcoz
"\t" not working

Recommended Answers

All 13 Replies

In what context are you attempting to use "\t"? Can you post your code?

i m using \t to make gap between words as it is need of project in a small area

Post some code so we can help

echo " text \t \t works perfect." on the sourcecode output"

but it does not work on the HTML code. no tabs does. you have to use css or table.

Just make sure you use "\t" and not '\t'

the \n \t can only be used to format the source code but it can also be used to format the display if it is inside the <pre></pre> tag

Correct me if I'm wrong, but if you do "word \t word" it is possible that the first word ended right before the tab stop, making the tab not noticable.

Foo	Bar
Foo Bar	Foo Bar
	Foo Bar

Line 1 = Foo\tBar
Line 2 = Foo Bar\tFoo Bar
Line 3 = \tFoo Bar

again, your example is correct according to me.
only if you view the source of the html.

AFAIK, that is not HTML tag, so it will be displayed s part of word that is
echo "CSGAL\t" will be displayed as CSGAL\t

use "CSGAL\\t"

echo "hello all thank you that you post your comment fit with my problem! may I be you firend";

"\t" is not working why i cant under stand.The code is given below

<?php
    for($i=0;$i<5;$i++)
    {
        echo "\t\tRamesh is learning PHP"."<br/>";
    }
?>

hey all,
can anybody help me regarding "\t" bcoz
"\t" not working

yeee hi...
can you put once '\t' in the place of "\t" it definitely work

since \t is equal to 4 spaces (sometimes 8 spaces) why not add 4/8 &nbsp;

<?php
for($i=0;$i<5;$i++)
{
echo "&nbsp;&nbsp;&nbsp;&nbsp;Ramesh is learning PHP"."<br/>";
}
?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.