Having Some Troubles With RemoveField
So the removeField command is supposed to remove a single field out of a tab seperated list, correct? I'm having some weird instances of it leaving some text behind.
For instance...
So it removes g2... but what's with that extra TAB and 1 at the end?
Any assistance would be much appreciated.
EDIT: Looks like removeWord does the same thing... Odd.
I should also note that removing the first field rather than the second seems to work fine.
For instance...
$test = "g1\tg2"; echo(removefield($test,1)); g1 1
So it removes g2... but what's with that extra TAB and 1 at the end?
Any assistance would be much appreciated.
EDIT: Looks like removeWord does the same thing... Odd.
echo(removeword($test,1)); g1 1
I should also note that removing the first field rather than the second seems to work fine.
echo(removefield($test,0)); g2
Comments
http://pastebin.com/m10275620
http://pastebin.com/d5fd41d4d
Preserved for posterity.