Page 1 of 1

how to write the code for delting duplicate lines?

Posted: Fri Oct 24, 2008 2:46 am
by swetha
i need to develop a tool which deleted duplicate lines in a textarea.
how do i write the code for it?

Re: how to write the code for delting duplicate lines?

Posted: Fri Oct 24, 2008 3:00 am
by requinix
Get the text, break it into an array, use array_flip, use array_flip again, and turn it back into a string.

Re: how to write the code for delting duplicate lines?

Posted: Fri Oct 24, 2008 6:45 am
by VladSun
Nice one, tasairis
:)