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.

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.

"\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/>";
    }
?>

Edited 3 Years Ago by mike_2000_17: Fixed formatting

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/>";
}
?>
This article has been dead for over six months. Start a new discussion instead.