EllisLab text mark
Advanced Search
     
automatically add some tabs to the beginning of my text which is getting from the database
Posted: 01 September 2007 06:55 AM   [ Ignore ]
Joined: 2007-08-25
8 posts

the text from form——->post to a controller——->insert into database——->query in another controller——->pass through the second parameter of loadview function——->in another view, i echo it out, but found it was add some tabs at the beginning of the text. i donno which step cause this, anyone can solve this problem? great thanks.
another question, how can i remove these tabs? i use ltrim() to remove it ,but failed, i just donno what is the second parameter, i tried ‘\t’ and ‘\t.’, both failed.

 
Posted: 01 September 2007 07:14 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2007-08-25
8 posts

oh geeeeeee!
i know what’s the problem. i use dreamweaver to format the source, and it add some tabs to the beginning of the text.
i’m so silly~~~

 
Posted: 01 September 2007 08:08 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2007-07-17
122 posts

Just for the records ‘\t’ is not a tab! is just a backslash and a ‘t’, to have it interpreted as a tab you need to use double quites, “\t” is indeed a tab. (same goes for newline, return etc)

 Signature 

Computers are incredibly fast, accurate and stupid. Human beings are incredibly slow, inaccurate and brilliant. Together they are powerful beyond imagination.

                                    A. Einstein