ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

In search of ... a way to kill tabs

<< < (2/2)

justice:
#1
Replace <php? echo $note ?>
with
<?php echo $note; ?>

#2
if you replace it with <?php echo "";?> are the tabs still there?

Stoic Joker:
Just out curiosity...(given that you've already tried the most common correct answers)... Have you considered that something later in the code could be putting the tabs back in?

I've gotten had by that one once or twice.

Stoic Joker:
Have you seen/tried this one?

http://stackoverflow.com/questions/1181559/how-do-i-replace-tabs-with-spaces-within-variables-in-php

barney:
Hm-m-m ... I don't thimk anything is throwing tabs in before storing the note, but I'll have another look.

And that still wouldn't 'splain why trim() & ltrim() aren't doing their job after I extract the note. 

Is there some character, maybe Unicode, that represents a tab w/o actually being a tab?  Or, perhaps, a textarea [HTML] configuration that automatically prefixes content?  Yeah, I know, that's reaching, but when logic fails, sometimes the illogical will work  :P.

Oh, on the typos:  I'm typing this in on the fly, not pasting from the actual code - that's why there are so many missing ; and such.  However, using several different IDEs - Komodo, CodeLobster for PHP, Rapid PHP 2010 - for testing purposes assures me that there are no typos in the code.  (I just wish one of those IDEs would let me step through the code.  CodeLobster has a start on that, but ...)

One other thing ... this seemingly applies only to the textarea element.  Just did a quick test on a type="text" element - no tabs.  In hindsight, I shoulda done that long ago, but then hindsight is always so much better  :tellme:.  Oh, and one text area on this page always prefixes six (6) tabs, the other five (5) tabs  :(.  And this seems to happen only on one page.  (I'm going through the include() files now to see if anything there might be a cause.)

Stoic Joker:
Is there some character, maybe Unicode, that represents a tab w/o actually being a tab?  Or, perhaps, a textarea [HTML] configuration that automatically prefixes content?  Yeah, I know, that's reaching, but when logic fails, sometimes the illogical will work  :P.-barney (August 17, 2011, 10:52 AM)
--- End quote ---

A string of spaces will leave a gap in the output, but tabs don't seem to work that way:

--- Code: HTML ---<textarea rows="2" name="S1" cols="20">     food</textarea>
I too resort to illogic at times.

Navigation

[0] Message Index

[*] Previous page

Go to full version